Djs API
Overview
Welcome to the Djs.com REST API!
View our SDK(Built with Restunited.com)
Base URL
All endpoints in the documentation starts with the following URL:
http://devcms.djs.com
Authentication
The following authentication method is supported:| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Installation Guide
The SDK (REST API client) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
Download and install
Please follow the instruction below to download the tarball, then includes the files in the project' }
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-flash.tar.gz
tar mzxvf DjsApi-prod-2.0.0-flash.tar.gz
mv DjsApi-flash /path/to/your/project/libs/
Import the library
Please refer to this tutorial for detailed instructions.
Download and install
Please follow the instruction below to download the tarball, then build and install the SDK using Gradle
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-java.tar.gz
tar mzxvf DjsApi-prod-2.0.0-java.tar.gz
cd DjsApi-java
gradle install
Update build.gradle in your project
Copydependencies {
compile 'com.djs.devcms:djs-api:2.0.0'
}
repositories {
mavenLocal()
}
dependencies {
compile 'com.djs.devcms:djs-api:2.0.0'
}
repositories {
mavenLocal()
}Import the packages
import java.io.File;
import java.util.*;
import com.djs.devcms.*;
import com.djs.devcms.api.*;
import com.djs.devcms.auth.*;
import com.djs.devcms.model.*;Configure
ApiClient apiClient = Configuration.getDefaultApiClient();
// apiClient.setBasePath("http://devcms.djs.com");
// configure authentications
Authentication auth;
auth = apiClient.getAuthentication("Default");
((ApiKeyAuth) auth).setApiKeyPrefix("Token");
((ApiKeyAuth) auth).setApiKey("YOUR_API_KEY");Download and Install
Please follow the instruction below to download the tarball and move the folder to the 'lib' folder in the project.
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-csharp.tar.gz
tar mzxvf DjsApi-prod-2.0.0-csharp.tar.gz
mv DjsApi-csharp /path/to/your/project/lib/
Add the library to the project in the IDE
- Open or create a C# application using your favorite IDE
- Add the folder
DjsApi-csharpto the project's "lib" folder - Add
System.Web, Microsoft.CSharp, System.Runtime.Serializationto the project's "References" - Use NuGet to add
RestSharpandJson.NETto the project (or manually add the DLLs under "bin" folder)
Import the following
using System;
using System.Web;
using System.IO;
using System.Collections.Generic;
using Com.Djs.Devcms.DjsApi;
using Com.Djs.Devcms.DjsApi.Api;
using Com.Djs.Devcms.DjsApi.Model;
using Com.Djs.Devcms.DjsApi.Client;Download and install
Please follow the instruction below to download the tarball, then build and install the Java JAR using Maven
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-java.tar.gz
tar mzxvf DjsApi-prod-2.0.0-java.tar.gz
cd DjsApi-java
mvn install
Update pom.xml
Copy<dependency>
<groupId>com.djs.devcms</groupId>
<artifactId>djs-api</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.djs.devcms</groupId>
<artifactId>djs-api</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
Import the packages
import java.io.File;
import java.util.*;
import com.djs.devcms.*;
import com.djs.devcms.api.*;
import com.djs.devcms.auth.*;
import com.djs.devcms.model.*;Configure
ApiClient apiClient = Configuration.getDefaultApiClient();
// apiClient.setBasePath("http://devcms.djs.com");
// configure authentications
Authentication auth;
auth = apiClient.getAuthentication("Default");
((ApiKeyAuth) auth).setApiKeyPrefix("Token");
((ApiKeyAuth) auth).setApiKey("YOUR_API_KEY");Use with Node.js
Please follow the instructions below to use the SDK with Node.js
Install swagger-client, if needed:
npm install swagger-clientThen setup the API client:
var fs = require('fs');
var client = require("swagger-client");
var swagger = new client({
url: 'http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/swagger2/swagger.json',
success: function() {
// configure authentications
swagger.clientAuthorizations.add("Default", new client.ApiKeyAuthorization("Authorization", "Token YOUR_API_KEY", "header"));
// the API client "swagger" is ready here
}
});Use with browser
Include swagger-client.min.js in the HTML page:
<script src="http://files1.restunited.com/swagger-js/swagger-client.min.js" type="text/javascript"></script>Then setup the API client:
window.swagger = new SwaggerClient({
url: 'http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/swagger2/swagger.json',
success: function() {
// configure authentications
swagger.clientAuthorizations.add("Default", new SwaggerClient.ApiKeyAuthorization("Authorization", "Token YOUR_API_KEY", "header"));
// the API client "swagger" is ready here
}
});
The SDK (REST API client) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
Download
Please follow the instruction below to download the tarball and move the folder to the "Vendor" folder in the project
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-objc.tar.gz
tar mzxvf DjsApi-prod-2.0.0-objc.tar.gz
mv DjsApi-objc /path/to/your/project/Vendor/Installation using CocoaPods
Please refer to http://CocoaPods.org on how to use CocoaPods to manage dependnecy for the project and then add DjsApi to the Podfile:
platform :ios, '7.0'
pod 'DjsApi', :path => 'Vendor/DjsApi-objc'In the command prompt, run pod install to install the SDK (built for iOS 6.0 or above) and all of the dependencies
Open XCode by running open myproject.xcworkspace (assuming the XCode project name is 'myproject')
Import the SDK
#import <DjsApi/SWGApiClient.h>
#import <DjsApi/SWGConfiguration.h>
// load models (response) defined for endpoints
#import <DjsApi/SWGVenuePaginationSerializer.h>
#import <DjsApi/SWGTrackPlayUpdateResponseSerializer.h>
#import <DjsApi/SWGTrackPlayResponseSerializer.h>
#import <DjsApi/SWGTrackPaginationSerializer.h>
#import <DjsApi/SWGSearchSerializer.h>
#import <DjsApi/SWGNewsletterSignupSerializer.h>
#import <DjsApi/SWGNewsletterSignupChangeRecordSerializer.h>
#import <DjsApi/SWGFeaturedTrackSerializer.h>
#import <DjsApi/SWGMusicSerializer.h>
#import <DjsApi/SWGLocationPaginationSerializer.h>
#import <DjsApi/SWGGenrePaginationSerializer.h>
#import <DjsApi/SWGEventPaginationSerializer.h>
#import <DjsApi/SWGDjTierSerializer.h>
#import <DjsApi/SWGGenreSerializer.h>
#import <DjsApi/SWGFeaturedArtistSerializer.h>
#import <DjsApi/SWGCountrySerializer.h>
#import <DjsApi/SWGCountryPaginationSerializer.h>
#import <DjsApi/SWGContactEntryChangeRecordSerializer.h>
#import <DjsApi/SWGContactEntrySerializer.h>
#import <DjsApi/SWGPostPaginationSerializer.h>
#import <DjsApi/SWGPostSerializer.h>
#import <DjsApi/SWGFavoriteTrackSerializer.h>
#import <DjsApi/SWGSuccessSerializer.h>
#import <DjsApi/SWGErrorResponseSerializer.h>
#import <DjsApi/SWGActiveUserSerializer.h>
#import <DjsApi/SWGAuthIndexResponseSerializer.h>
#import <DjsApi/SWGFollowingArtistSerializer.h>
#import <DjsApi/SWGAuthStatusResponseSerializer.h>
#import <DjsApi/SWGAuthResponseSerializer.h>
#import <DjsApi/SWGActiveArtistSerializer.h>
#import <DjsApi/SWGFeaturedEventSerializer.h>
#import <DjsApi/SWGSoundCloudSerializer.h>
#import <DjsApi/SWGVenueEventSerializer.h>
#import <DjsApi/SWGTrackArtistSerializer.h>
#import <DjsApi/SWGTrackSerializer.h>
#import <DjsApi/SWGMessageSerializer.h>
#import <DjsApi/SWGArtistPaginationSerializer.h>
#import <DjsApi/SWGEventArtistSerializer.h>
#import <DjsApi/SWGArtistSerializer.h>
#import <DjsApi/SWGVenueSerializer.h>
#import <DjsApi/SWGArtistChangeRecordSerializer.h>
#import <DjsApi/SWGSuccessAndErrorSerializer.h>
#import <DjsApi/SWGFeaturedVenueSerializer.h>
#import <DjsApi/SWGEventSerializer.h>
#import <DjsApi/SWGClaimSerializer.h>
#import <DjsApi/SWGFollowerSerializer.h>
#import <DjsApi/SWGVenueLocationSerializer.h>
#import <DjsApi/SWGGenreArtistSerializer.h>
#import <DjsApi/SWGLocationSerializer.h>
// load classes for accessing the endpoints
#import <DjsApi/SWGWebApi.h>
Download and install
Please follow the instruction below to download the tarball in your project folder and then install the PHP libraries
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-php.tar.gz
tar mzxvf DjsApi-prod-2.0.0-php.tar.gz
(Optional) If php5-curl package not yet installed, please run
sudo apt-get install php5-curl
Import the library
<?php
require_once 'DjsApi-php/autoload.php';
// uncomment below to set timezone ref: http://php.net/manual/en/timezones.php
//date_default_timezone_set('America/New_York');
// uncomment below to enable debugging
// DjsApi\Configuration::getDefaultConfiguration()->setDebug(TRUE);
?>
Download and install
Please follow the instruction below to download the tarball and then install the Python modules
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-python.tar.gz
tar mzxvf DjsApi-prod-2.0.0-python.tar.gz
cd DjsApi-python
python setup.py install --user
(Optional) To install the module for all users, please run
sudo python setup.py install
Import the Python modules
import time
import djs_api
from djs_api.rest import ApiException
from pprint import pprint
Download and Install
Please follow the instruction below to download and use the Ruby SDK
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-ruby.tar.gz
tar mzxvf DjsApi-prod-2.0.0-ruby.tar.gzTo use the SDK without installing it as a gem, run with the -I flag as follows:
ruby -IDjsApi-ruby/lib your-ruby-file.rbOtherwise build the SDK into a Ruby gem and install it locally:
cd DjsApi-ruby
gem build djs_api.gemspec
gem install ./djs_api-2.0.0.gemTo use the Ruby gem with Bundler, include the following in Gemfile and run bundle install
gem "djs_api", "~> 2.0.0"Require the Ruby gem
require 'djs_api'(Optional) Configuration
Initialize configuration with other values
DjsApi.configure do |config|
config.scheme = 'http'
config.host = 'devcms.djs.com'
config.base_path = ''
config.inject_format = false
endDownload and install
Please follow the instruction below to download the tarball, then build and install the SDK using sbt
wget http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/DjsApi-prod-2.0.0-java.tar.gz
tar mzxvf DjsApi-prod-2.0.0-java.tar.gz
cd DjsApi-java
sbt publishM2
Update build.sbt in your project
Copyresolvers += Resolver.mavenLocal,
libraryDependencies += "com.djs.devcms" % "djs-api_2.11" % "2.0.0"
resolvers += Resolver.mavenLocal,
libraryDependencies += "com.djs.devcms" % "djs-api_2.11" % "2.0.0"Import the packages
import java.io.File
import java.util.{List => _, _}
import collection.JavaConversions._
import scala.language.implicitConversions
import com.djs.devcms._
import com.djs.devcms.api._
import com.djs.devcms.auth._
import com.djs.devcms.model._Configure
val apiClient = Configuration.getDefaultApiClient
private def configure {
// apiClient.setBasePath("http://devcms.djs.com")
// configure authentications
var auth: Authentication = null
auth = apiClient.getAuthentication("Default")
auth.asInstanceOf[ApiKeyAuth].setApiKeyPrefix("Token")
auth.asInstanceOf[ApiKeyAuth].setApiKey("YOUR_API_KEY")
}
configure
implicit def toBooleanList(list: List[Boolean]) = seqAsJavaList(list.map(i => i:java.lang.Boolean))
implicit def toFloatList(list: List[Float]) = seqAsJavaList(list.map(i => i:java.lang.Float))
implicit def toIntegerList(list: List[Int]) = seqAsJavaList(list.map(i => i:java.lang.Integer))Testing
To faciliate testing, the following example code contains all the endpoint methods available in the SDK.
Example Code in ActionScript is being worked on at the moment.
// File: DjsApi-java/src/main/java/com/djs/devcms/DjsApiTestAndroid.java
package com.djs.devcms;
import java.io.File;
import java.util.*;
import com.djs.devcms.*;
import com.djs.devcms.api.*;
import com.djs.devcms.auth.*;
import com.djs.devcms.model.*;
public class DjsApiTestAndroid {
private ApiClient apiClient;
public DjsApiTestAndroid() {
apiClient = Configuration.getDefaultApiClient();
// apiClient.setBasePath("http://devcms.djs.com");
// configure authentications
Authentication auth;
auth = apiClient.getAuthentication("Default");
((ApiKeyAuth) auth).setApiKeyPrefix("Token");
((ApiKeyAuth) auth).setApiKey("YOUR_API_KEY");
}
public void testArtistCreateWeb() {
String name = "sampleName"; // name
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackUpdateTrackWeb() {
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // Slug of track
String title = "sampleTitle"; // Track Title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // Track Description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistCreateDjWeb() {
String name = "sampleName"; // DJ Name of artist
String email = "sampleEmail"; // Email of artist
String password = "samplePassword"; // Password
String genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
String soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
String soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ArtistChangeRecordSerializer response = webApi.artistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistFinishClaimWeb() {
String pk = "samplePk"; // pk
String name = "sampleName"; // name
String email = "sampleEmail"; // New dj email
String password = "samplePassword"; // New dj password
String accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
SuccessAndErrorSerializer response = webApi.artistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackPlayUpdateWeb() {
String analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
String duration = "sampleDuration"; // Duration of the audio play session.
String maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try {
WebApi webApi = new WebApi();
TrackPlayUpdateResponseSerializer response = webApi.trackPlayUpdate(analyticsKey, duration, maxTimecode);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackPlayNextWeb() {
String currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
String currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
String mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
String ipAddress = "sampleIpAddress"; // IP Address of requestor
String genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
String playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackPlayWeb() {
String artistSkId = "sampleArtistSkId"; // SK ID of the artist
String trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
String ipAddress = "sampleIpAddress"; // IP Address of requestor
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlay(artistSkId, trackInternalId, ipAddress);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackDeleteTrackWeb() {
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String title = "sampleTitle"; // title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.trackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthAccessTokenWeb() {
String apiSecret = "sampleApiSecret"; // API Secret Given To Your App
String apiKey = "sampleApiKey"; // API Key Given To Your App
String username = "sampleUsername"; // Username logging in
String password = "samplePassword"; // Password logging in
try {
WebApi webApi = new WebApi();
AuthResponseSerializer response = webApi.authAccessToken(apiSecret, apiKey, username, password);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthCreateUserWeb() {
String email = "sampleEmail"; // email address
String password = "samplePassword"; // password
String facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String firstName = "sampleFirstName"; // First Name
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // Stream user profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackCreateTrackWeb() {
String title = "sampleTitle"; // Track Title
String internalId = "sampleInternalId"; // internal_id
String description = "sampleDescription"; // Track Description
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String tagList = "sampleTagList"; // tag_list
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String slug = "sampleSlug"; // slug
String artworkUrl = "sampleArtworkUrl"; // artwork_url
Long playbackCount = new Long(-2147483648); // playback_count
String state = "sampleState"; // state
Long favoritingsCount = new Long(-2147483648); // favoritings_count
String genre = "sampleGenre"; // genre
String kind = "sampleKind"; // kind
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testNewsletterSignupCreateWeb() {
String email = "sampleEmail"; // Contact Email
String name = "sampleName"; // Contact Name
String listOverride = "sampleListOverride"; // Mailchimp override
try {
WebApi webApi = new WebApi();
NewsletterSignupChangeRecordSerializer response = webApi.newsletterSignupCreate(email, name, listOverride);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthResetPasswordCompleteWeb() {
String token = "sampleToken"; // Token
String newPassword = "sampleNewPassword"; // New Password
String email = "sampleEmail"; // Email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordComplete(token, newPassword, email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthResetPasswordSendEmailWeb() {
String email = "sampleEmail"; // User email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordSendEmail(email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventUpdateEventWeb() {
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // Event Display Name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // URI of the ticket link
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventDeleteEventWeb() {
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // display_name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // uri
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.eventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthUpdateArtistUserWeb() {
String pk = "samplePk"; // pk
String itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
String youtube = "sampleYoutube"; // youtube Slug
String contactEmail = "sampleContactEmail"; // Email business contact
String djName = "sampleDjName"; // DJ Name
String paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
String paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
String paymentCity = "samplePaymentCity"; // Payment City
String paymentState = "samplePaymentState"; // Payment State
String paymentZip = "samplePaymentZip"; // Payment Zip
String country = "sampleCountry"; // Country Code
String soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
String paymentEin = "samplePaymentEin"; // Payment EIN Number
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthUpdateUserWeb() {
String pk = "samplePk"; // pk
String closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthViewArtistUserWeb() {
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthViewUserWeb() {
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testContactEntryCreateWeb() {
String name = "sampleName"; // Contact Name
String email = "sampleEmail"; // Contact Email
String comments = "sampleComments"; // Comments
String phone = "samplePhone"; // Contact Phone
try {
WebApi webApi = new WebApi();
ContactEntryChangeRecordSerializer response = webApi.contactEntryCreate(name, email, comments, phone);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventCreateEventWeb() {
String displayName = "sampleDisplayName"; // Event Display Name
String uri = "sampleUri"; // URI of the ticket link
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String ageRestriction = "sampleAgeRestriction"; // age_restriction
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventList(page, onlyFields, perPage, ordering, artistsArtistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testDjTierGetWeb() {
String page = "samplePage"; // How many results to be returned in each category
String genre = "sampleGenre"; // Which genre key to filter on
String genreId = "sampleGenreId"; // Which genre id/pk to filter on
try {
WebApi webApi = new WebApi();
DjTierSerializer response = webApi.djTierGet(page, genre, genreId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventArtistListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String displayName = "sampleDisplayName"; // Search by display name of artist
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventArtistList(page, perPage, ordering, displayName);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventArtistRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventArtistSerializer response = webApi.eventArtistRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testCountryListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try {
WebApi webApi = new WebApi();
CountryPaginationSerializer response = webApi.countryList(page, perPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthUnfollowUserWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authUnfollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testCountryRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
CountrySerializer response = webApi.countryRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthStatusWeb() {
try {
WebApi webApi = new WebApi();
AuthStatusResponseSerializer response = webApi.authStatus();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testGenreArtistsWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreArtists(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testGenreListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try {
WebApi webApi = new WebApi();
GenrePaginationSerializer response = webApi.genreList(page, perPage, ordering);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testGenreRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testLocationListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationPaginationSerializer response = webApi.locationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testLocationRetrieveWeb() {
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationSerializer response = webApi.locationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testMusicGetWeb() {
String page = "samplePage"; // How many results to be returned in each category
try {
WebApi webApi = new WebApi();
MusicSerializer response = webApi.musicGet(page);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthListWeb() {
try {
WebApi webApi = new WebApi();
AuthIndexResponseSerializer response = webApi.authList();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testPostListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String authorId = "sampleAuthorId"; // ID of author to filter
String categoryTitle = "sampleCategoryTitle"; // Category string to filter by
String title = "sampleTitle"; // Filter by blog post title
String featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
String isDraft = "sampleIsDraft"; // Filter by is_draft
try {
WebApi webApi = new WebApi();
PostPaginationSerializer response = webApi.postList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testPostRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
PostSerializer response = webApi.postRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testSearchGetWeb() {
String q = "sampleQ"; // Search criteria
String perPage = "samplePerPage"; // How many results to be returned in each category
String withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
String withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
String withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
String withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
String withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try {
WebApi webApi = new WebApi();
SearchSerializer response = webApi.searchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthFollowUserWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authFollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistUnfollowWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistUnfollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackFindRelatedWeb() {
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackLikeWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackLike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistRetrieveWeb() {
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String genresKey = "sampleGenresKey"; // Filter artists by genre key
String tier = "sampleTier"; // Filter by artist tier
String withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try {
WebApi webApi = new WebApi();
ArtistPaginationSerializer response = webApi.artistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistFollowWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistFollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackRepostWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackTrendingWeb() {
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
String trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
String trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackUnlikeWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnlike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackUnrepostWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnrepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistClaimWeb() {
String pk = "samplePk"; // pk
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ClaimSerializer response = webApi.artistClaim(pk, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testVenueListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
Boolean exclusive = false; // Boolean flag used to show which venues we have full blown...
String locationSlug = "sampleLocationSlug"; // Filter by venue location slug
String withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try {
WebApi webApi = new WebApi();
VenuePaginationSerializer response = webApi.venueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testVenueRetrieveWeb() {
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try {
WebApi webApi = new WebApi();
VenueSerializer response = webApi.venueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void sleep(int milliseconds) {
try {
Thread.sleep(milliseconds);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
public void testAll() {
/* Resource: Web */
System.out.println("Calling endpoint: artistCreate");
testArtistCreateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackUpdateTrack");
testTrackUpdateTrackWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistCreateDj");
testArtistCreateDjWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistFinishClaim");
testArtistFinishClaimWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackPlayUpdate");
testTrackPlayUpdateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackPlayNext");
testTrackPlayNextWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackPlay");
testTrackPlayWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackDeleteTrack");
testTrackDeleteTrackWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authAccessToken");
testAuthAccessTokenWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authCreateUser");
testAuthCreateUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackCreateTrack");
testTrackCreateTrackWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: newsletterSignupCreate");
testNewsletterSignupCreateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authResetPasswordComplete");
testAuthResetPasswordCompleteWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authResetPasswordSendEmail");
testAuthResetPasswordSendEmailWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventUpdateEvent");
testEventUpdateEventWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventDeleteEvent");
testEventDeleteEventWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authUpdateArtistUser");
testAuthUpdateArtistUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authUpdateUser");
testAuthUpdateUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authViewArtistUser");
testAuthViewArtistUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authViewUser");
testAuthViewUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: contactEntryCreate");
testContactEntryCreateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventCreateEvent");
testEventCreateEventWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventList");
testEventListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: djTierGet");
testDjTierGetWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventArtistList");
testEventArtistListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventArtistRetrieve");
testEventArtistRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: countryList");
testCountryListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authUnfollowUser");
testAuthUnfollowUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: countryRetrieve");
testCountryRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventRetrieve");
testEventRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authStatus");
testAuthStatusWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: genreArtists");
testGenreArtistsWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: genreList");
testGenreListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: genreRetrieve");
testGenreRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: locationList");
testLocationListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: locationRetrieve");
testLocationRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: musicGet");
testMusicGetWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authList");
testAuthListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: postList");
testPostListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: postRetrieve");
testPostRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: searchGet");
testSearchGetWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authFollowUser");
testAuthFollowUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistUnfollow");
testArtistUnfollowWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackFindRelated");
testTrackFindRelatedWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackLike");
testTrackLikeWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackList");
testTrackListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistRetrieve");
testArtistRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistList");
testArtistListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistFollow");
testArtistFollowWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackRepost");
testTrackRepostWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackRetrieve");
testTrackRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackTrending");
testTrackTrendingWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackUnlike");
testTrackUnlikeWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackUnrepost");
testTrackUnrepostWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistClaim");
testArtistClaimWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: venueList");
testVenueListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: venueRetrieve");
testVenueRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
}
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
DjsApiTestAndroid test = new DjsApiTestAndroid();
test.testAll();
}
}
// Run this file:
// cd DjsApi-java
// gradle -DmainClass="com.djs.devcms.DjsApiTestAndroid" executeusing NUnit.Framework;
using System;
using System.Web;
using System.IO;
using System.Collections.Generic;
using Com.Djs.Devcms.DjsApi;
using Com.Djs.Devcms.DjsApi.Api;
using Com.Djs.Devcms.DjsApi.Model;
using Com.Djs.Devcms.DjsApi.Client;
public class DjsApiTest
{
[Test]
public void TestWebArtistcreate()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String name = "sampleName"; // name
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
long? tier = -2147483648; // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
bool? hasMixbank = false; // has_mixbank
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackupdatetrack()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // Slug of track
String title = "sampleTitle"; // Track Title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // Track Description
long? favoritingsCount = -2147483648; // favoritings_count
long? playbackCount = -2147483648; // playback_count
DateTime? uploadedOn = DateTime.Parse("2014-12-31"); // uploaded_on
bool? isLiked = false; // is_liked
bool? isReposted = false; // is_reposted
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistcreatedj()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String name = "sampleName"; // DJ Name of artist
String email = "sampleEmail"; // Email of artist
String password = "samplePassword"; // Password
String genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
long? tier = -2147483648; // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
bool? hasMixbank = false; // has_mixbank
String soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
String soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistChangeRecordSerializer response = webApi.ArtistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistfinishclaim()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String name = "sampleName"; // name
String email = "sampleEmail"; // New dj email
String password = "samplePassword"; // New dj password
String accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
long? tier = -2147483648; // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
bool? hasMixbank = false; // has_mixbank
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessAndErrorSerializer response = webApi.ArtistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackplayupdate()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
String duration = "sampleDuration"; // Duration of the audio play session.
String maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPlayUpdateResponseSerializer response = webApi.TrackPlayUpdate(analyticsKey, duration, maxTimecode);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackplaynext()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
String currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
String mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
String ipAddress = "sampleIpAddress"; // IP Address of requestor
String genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
String playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPlayResponseSerializer response = webApi.TrackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackplay()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String artistSkId = "sampleArtistSkId"; // SK ID of the artist
String trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
String ipAddress = "sampleIpAddress"; // IP Address of requestor
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPlayResponseSerializer response = webApi.TrackPlay(artistSkId, trackInternalId, ipAddress);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackdeletetrack()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String title = "sampleTitle"; // title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // description
long? favoritingsCount = -2147483648; // favoritings_count
long? playbackCount = -2147483648; // playback_count
DateTime? uploadedOn = DateTime.Parse("2014-12-31"); // uploaded_on
bool? isLiked = false; // is_liked
bool? isReposted = false; // is_reposted
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.TrackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthaccesstoken()
{
String apiSecret = "sampleApiSecret"; // API Secret Given To Your App
String apiKey = "sampleApiKey"; // API Key Given To Your App
String username = "sampleUsername"; // Username logging in
String password = "samplePassword"; // Password logging in
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
AuthResponseSerializer response = webApi.AuthAccessToken(apiSecret, apiKey, username, password);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthcreateuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String email = "sampleEmail"; // email address
String password = "samplePassword"; // password
String facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String firstName = "sampleFirstName"; // First Name
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // Stream user profile description
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveUserSerializer response = webApi.AuthCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackcreatetrack()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String title = "sampleTitle"; // Track Title
String internalId = "sampleInternalId"; // internal_id
String description = "sampleDescription"; // Track Description
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String tagList = "sampleTagList"; // tag_list
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String slug = "sampleSlug"; // slug
String artworkUrl = "sampleArtworkUrl"; // artwork_url
long? playbackCount = -2147483648; // playback_count
String state = "sampleState"; // state
long? favoritingsCount = -2147483648; // favoritings_count
String genre = "sampleGenre"; // genre
String kind = "sampleKind"; // kind
DateTime? uploadedOn = DateTime.Parse("2014-12-31"); // uploaded_on
bool? isLiked = false; // is_liked
bool? isReposted = false; // is_reposted
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebNewslettersignupcreate()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String email = "sampleEmail"; // Contact Email
String name = "sampleName"; // Contact Name
String listOverride = "sampleListOverride"; // Mailchimp override
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
NewsletterSignupChangeRecordSerializer response = webApi.NewsletterSignupCreate(email, name, listOverride);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthresetpasswordcomplete()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String token = "sampleToken"; // Token
String newPassword = "sampleNewPassword"; // New Password
String email = "sampleEmail"; // Email
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthResetPasswordComplete(token, newPassword, email);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthresetpasswordsendemail()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String email = "sampleEmail"; // User email
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthResetPasswordSendEmail(email);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventupdateevent()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // Event Display Name
DateTime? eventDateStart = DateTime.Parse("2014-12-31"); // event_date_start
DateTime? eventDateEnd = DateTime.Parse("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // URI of the ticket link
bool? disabled = false; // disabled
String venue = "sampleVenue"; // venue
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventSerializer response = webApi.EventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventdeleteevent()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // display_name
DateTime? eventDateStart = DateTime.Parse("2014-12-31"); // event_date_start
DateTime? eventDateEnd = DateTime.Parse("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // uri
bool? disabled = false; // disabled
String venue = "sampleVenue"; // venue
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.EventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthupdateartistuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
String youtube = "sampleYoutube"; // youtube Slug
String contactEmail = "sampleContactEmail"; // Email business contact
String djName = "sampleDjName"; // DJ Name
String paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
String paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
String paymentCity = "samplePaymentCity"; // Payment City
String paymentState = "samplePaymentState"; // Payment State
String paymentZip = "samplePaymentZip"; // Payment Zip
String country = "sampleCountry"; // Country Code
String soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
String paymentEin = "samplePaymentEin"; // Payment EIN Number
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveArtistSerializer response = webApi.AuthUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthupdateuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveUserSerializer response = webApi.AuthUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthviewartistuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveArtistSerializer response = webApi.AuthViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthviewuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveUserSerializer response = webApi.AuthViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebContactentrycreate()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String name = "sampleName"; // Contact Name
String email = "sampleEmail"; // Contact Email
String comments = "sampleComments"; // Comments
String phone = "samplePhone"; // Contact Phone
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ContactEntryChangeRecordSerializer response = webApi.ContactEntryCreate(name, email, comments, phone);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventcreateevent()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String displayName = "sampleDisplayName"; // Event Display Name
String uri = "sampleUri"; // URI of the ticket link
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
DateTime? eventDateStart = DateTime.Parse("2014-12-31"); // event_date_start
DateTime? eventDateEnd = DateTime.Parse("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String ageRestriction = "sampleAgeRestriction"; // age_restriction
bool? disabled = false; // disabled
String venue = "sampleVenue"; // venue
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventSerializer response = webApi.EventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventlist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventPaginationSerializer response = webApi.EventList(page, onlyFields, perPage, ordering, artistsArtistSlug);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebDjtierget()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // How many results to be returned in each category
String genre = "sampleGenre"; // Which genre key to filter on
String genreId = "sampleGenreId"; // Which genre id/pk to filter on
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
DjTierSerializer response = webApi.DjTierGet(page, genre, genreId);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventartistlist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String displayName = "sampleDisplayName"; // Search by display name of artist
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventPaginationSerializer response = webApi.EventArtistList(page, perPage, ordering, displayName);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventartistretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventArtistSerializer response = webApi.EventArtistRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebCountrylist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
CountryPaginationSerializer response = webApi.CountryList(page, perPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthunfollowuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthUnfollowUser(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebCountryretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
CountrySerializer response = webApi.CountryRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebEventretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventSerializer response = webApi.EventRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthstatus()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
AuthStatusResponseSerializer response = webApi.AuthStatus();
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebGenreartists()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
GenreSerializer response = webApi.GenreArtists(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebGenrelist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
GenrePaginationSerializer response = webApi.GenreList(page, perPage, ordering);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebGenreretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
GenreSerializer response = webApi.GenreRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebLocationlist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
bool? selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
bool? exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
LocationPaginationSerializer response = webApi.LocationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebLocationretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
bool? selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
bool? exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
LocationSerializer response = webApi.LocationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebMusicget()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // How many results to be returned in each category
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
MusicSerializer response = webApi.MusicGet(page);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthlist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
AuthIndexResponseSerializer response = webApi.AuthList();
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebPostlist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String authorId = "sampleAuthorId"; // ID of author to filter
String categoryTitle = "sampleCategoryTitle"; // Category string to filter by
String title = "sampleTitle"; // Filter by blog post title
String featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
String isDraft = "sampleIsDraft"; // Filter by is_draft
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
PostPaginationSerializer response = webApi.PostList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebPostretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
PostSerializer response = webApi.PostRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebSearchget()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String q = "sampleQ"; // Search criteria
String perPage = "samplePerPage"; // How many results to be returned in each category
String withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
String withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
String withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
String withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
String withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SearchSerializer response = webApi.SearchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebAuthfollowuser()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthFollowUser(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistunfollow()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistUnfollow(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackfindrelated()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPaginationSerializer response = webApi.TrackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTracklike()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackLike(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTracklist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPaginationSerializer response = webApi.TrackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistlist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String genresKey = "sampleGenresKey"; // Filter artists by genre key
String tier = "sampleTier"; // Filter by artist tier
String withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistPaginationSerializer response = webApi.ArtistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistfollow()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistFollow(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackrepost()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackRepost(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTracktrending()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
String trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
String trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPaginationSerializer response = webApi.TrackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackunlike()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackUnlike(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebTrackunrepost()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackUnrepost(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebArtistclaim()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ClaimSerializer response = webApi.ArtistClaim(pk, code);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebVenuelist()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
bool? exclusive = false; // Boolean flag used to show which venues we have full blown...
String locationSlug = "sampleLocationSlug"; // Filter by venue location slug
String withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
VenuePaginationSerializer response = webApi.VenueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
[Test]
public void TestWebVenueretrieve()
{
// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
VenueSerializer response = webApi.VenueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Add "Assert" here. Ref: http://www.nunit.org/index.php?p=assertions&r=2.6.4
}
}// File: DjsApi-java/src/main/java/com/djs/devcms/DjsApiTestJava.java
package com.djs.devcms;
import java.io.File;
import java.util.*;
import com.djs.devcms.*;
import com.djs.devcms.api.*;
import com.djs.devcms.auth.*;
import com.djs.devcms.model.*;
public class DjsApiTestJava {
private ApiClient apiClient;
public DjsApiTestJava() {
apiClient = Configuration.getDefaultApiClient();
// apiClient.setBasePath("http://devcms.djs.com");
// configure authentications
Authentication auth;
auth = apiClient.getAuthentication("Default");
((ApiKeyAuth) auth).setApiKeyPrefix("Token");
((ApiKeyAuth) auth).setApiKey("YOUR_API_KEY");
}
public void testArtistCreateWeb() {
String name = "sampleName"; // name
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackUpdateTrackWeb() {
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // Slug of track
String title = "sampleTitle"; // Track Title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // Track Description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistCreateDjWeb() {
String name = "sampleName"; // DJ Name of artist
String email = "sampleEmail"; // Email of artist
String password = "samplePassword"; // Password
String genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
String soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
String soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ArtistChangeRecordSerializer response = webApi.artistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistFinishClaimWeb() {
String pk = "samplePk"; // pk
String name = "sampleName"; // name
String email = "sampleEmail"; // New dj email
String password = "samplePassword"; // New dj password
String accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
SuccessAndErrorSerializer response = webApi.artistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackPlayUpdateWeb() {
String analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
String duration = "sampleDuration"; // Duration of the audio play session.
String maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try {
WebApi webApi = new WebApi();
TrackPlayUpdateResponseSerializer response = webApi.trackPlayUpdate(analyticsKey, duration, maxTimecode);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackPlayNextWeb() {
String currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
String currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
String mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
String ipAddress = "sampleIpAddress"; // IP Address of requestor
String genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
String playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackPlayWeb() {
String artistSkId = "sampleArtistSkId"; // SK ID of the artist
String trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
String ipAddress = "sampleIpAddress"; // IP Address of requestor
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlay(artistSkId, trackInternalId, ipAddress);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackDeleteTrackWeb() {
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String title = "sampleTitle"; // title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.trackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthAccessTokenWeb() {
String apiSecret = "sampleApiSecret"; // API Secret Given To Your App
String apiKey = "sampleApiKey"; // API Key Given To Your App
String username = "sampleUsername"; // Username logging in
String password = "samplePassword"; // Password logging in
try {
WebApi webApi = new WebApi();
AuthResponseSerializer response = webApi.authAccessToken(apiSecret, apiKey, username, password);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthCreateUserWeb() {
String email = "sampleEmail"; // email address
String password = "samplePassword"; // password
String facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String firstName = "sampleFirstName"; // First Name
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // Stream user profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackCreateTrackWeb() {
String title = "sampleTitle"; // Track Title
String internalId = "sampleInternalId"; // internal_id
String description = "sampleDescription"; // Track Description
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String tagList = "sampleTagList"; // tag_list
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String slug = "sampleSlug"; // slug
String artworkUrl = "sampleArtworkUrl"; // artwork_url
Long playbackCount = new Long(-2147483648); // playback_count
String state = "sampleState"; // state
Long favoritingsCount = new Long(-2147483648); // favoritings_count
String genre = "sampleGenre"; // genre
String kind = "sampleKind"; // kind
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testNewsletterSignupCreateWeb() {
String email = "sampleEmail"; // Contact Email
String name = "sampleName"; // Contact Name
String listOverride = "sampleListOverride"; // Mailchimp override
try {
WebApi webApi = new WebApi();
NewsletterSignupChangeRecordSerializer response = webApi.newsletterSignupCreate(email, name, listOverride);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthResetPasswordCompleteWeb() {
String token = "sampleToken"; // Token
String newPassword = "sampleNewPassword"; // New Password
String email = "sampleEmail"; // Email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordComplete(token, newPassword, email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthResetPasswordSendEmailWeb() {
String email = "sampleEmail"; // User email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordSendEmail(email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventUpdateEventWeb() {
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // Event Display Name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // URI of the ticket link
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventDeleteEventWeb() {
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // display_name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // uri
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.eventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthUpdateArtistUserWeb() {
String pk = "samplePk"; // pk
String itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
String youtube = "sampleYoutube"; // youtube Slug
String contactEmail = "sampleContactEmail"; // Email business contact
String djName = "sampleDjName"; // DJ Name
String paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
String paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
String paymentCity = "samplePaymentCity"; // Payment City
String paymentState = "samplePaymentState"; // Payment State
String paymentZip = "samplePaymentZip"; // Payment Zip
String country = "sampleCountry"; // Country Code
String soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
String paymentEin = "samplePaymentEin"; // Payment EIN Number
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthUpdateUserWeb() {
String pk = "samplePk"; // pk
String closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthViewArtistUserWeb() {
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthViewUserWeb() {
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testContactEntryCreateWeb() {
String name = "sampleName"; // Contact Name
String email = "sampleEmail"; // Contact Email
String comments = "sampleComments"; // Comments
String phone = "samplePhone"; // Contact Phone
try {
WebApi webApi = new WebApi();
ContactEntryChangeRecordSerializer response = webApi.contactEntryCreate(name, email, comments, phone);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventCreateEventWeb() {
String displayName = "sampleDisplayName"; // Event Display Name
String uri = "sampleUri"; // URI of the ticket link
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String ageRestriction = "sampleAgeRestriction"; // age_restriction
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventList(page, onlyFields, perPage, ordering, artistsArtistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testDjTierGetWeb() {
String page = "samplePage"; // How many results to be returned in each category
String genre = "sampleGenre"; // Which genre key to filter on
String genreId = "sampleGenreId"; // Which genre id/pk to filter on
try {
WebApi webApi = new WebApi();
DjTierSerializer response = webApi.djTierGet(page, genre, genreId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventArtistListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String displayName = "sampleDisplayName"; // Search by display name of artist
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventArtistList(page, perPage, ordering, displayName);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventArtistRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventArtistSerializer response = webApi.eventArtistRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testCountryListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try {
WebApi webApi = new WebApi();
CountryPaginationSerializer response = webApi.countryList(page, perPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthUnfollowUserWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authUnfollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testCountryRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
CountrySerializer response = webApi.countryRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testEventRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthStatusWeb() {
try {
WebApi webApi = new WebApi();
AuthStatusResponseSerializer response = webApi.authStatus();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testGenreArtistsWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreArtists(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testGenreListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try {
WebApi webApi = new WebApi();
GenrePaginationSerializer response = webApi.genreList(page, perPage, ordering);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testGenreRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testLocationListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationPaginationSerializer response = webApi.locationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testLocationRetrieveWeb() {
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationSerializer response = webApi.locationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testMusicGetWeb() {
String page = "samplePage"; // How many results to be returned in each category
try {
WebApi webApi = new WebApi();
MusicSerializer response = webApi.musicGet(page);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthListWeb() {
try {
WebApi webApi = new WebApi();
AuthIndexResponseSerializer response = webApi.authList();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testPostListWeb() {
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String authorId = "sampleAuthorId"; // ID of author to filter
String categoryTitle = "sampleCategoryTitle"; // Category string to filter by
String title = "sampleTitle"; // Filter by blog post title
String featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
String isDraft = "sampleIsDraft"; // Filter by is_draft
try {
WebApi webApi = new WebApi();
PostPaginationSerializer response = webApi.postList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testPostRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
PostSerializer response = webApi.postRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testSearchGetWeb() {
String q = "sampleQ"; // Search criteria
String perPage = "samplePerPage"; // How many results to be returned in each category
String withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
String withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
String withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
String withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
String withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try {
WebApi webApi = new WebApi();
SearchSerializer response = webApi.searchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testAuthFollowUserWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authFollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistUnfollowWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistUnfollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackFindRelatedWeb() {
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackLikeWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackLike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistRetrieveWeb() {
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String genresKey = "sampleGenresKey"; // Filter artists by genre key
String tier = "sampleTier"; // Filter by artist tier
String withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try {
WebApi webApi = new WebApi();
ArtistPaginationSerializer response = webApi.artistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistFollowWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistFollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackRepostWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackRetrieveWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackTrendingWeb() {
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
String trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
String trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackUnlikeWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnlike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testTrackUnrepostWeb() {
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnrepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testArtistClaimWeb() {
String pk = "samplePk"; // pk
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ClaimSerializer response = webApi.artistClaim(pk, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testVenueListWeb() {
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
Boolean exclusive = false; // Boolean flag used to show which venues we have full blown...
String locationSlug = "sampleLocationSlug"; // Filter by venue location slug
String withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try {
WebApi webApi = new WebApi();
VenuePaginationSerializer response = webApi.venueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void testVenueRetrieveWeb() {
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try {
WebApi webApi = new WebApi();
VenueSerializer response = webApi.venueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
}
public void sleep(int milliseconds) {
try {
Thread.sleep(milliseconds);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
public void testAll() {
/* Resource: Web */
System.out.println("Calling endpoint: artistCreate");
testArtistCreateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackUpdateTrack");
testTrackUpdateTrackWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistCreateDj");
testArtistCreateDjWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistFinishClaim");
testArtistFinishClaimWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackPlayUpdate");
testTrackPlayUpdateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackPlayNext");
testTrackPlayNextWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackPlay");
testTrackPlayWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackDeleteTrack");
testTrackDeleteTrackWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authAccessToken");
testAuthAccessTokenWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authCreateUser");
testAuthCreateUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackCreateTrack");
testTrackCreateTrackWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: newsletterSignupCreate");
testNewsletterSignupCreateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authResetPasswordComplete");
testAuthResetPasswordCompleteWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authResetPasswordSendEmail");
testAuthResetPasswordSendEmailWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventUpdateEvent");
testEventUpdateEventWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventDeleteEvent");
testEventDeleteEventWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authUpdateArtistUser");
testAuthUpdateArtistUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authUpdateUser");
testAuthUpdateUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authViewArtistUser");
testAuthViewArtistUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authViewUser");
testAuthViewUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: contactEntryCreate");
testContactEntryCreateWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventCreateEvent");
testEventCreateEventWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventList");
testEventListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: djTierGet");
testDjTierGetWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventArtistList");
testEventArtistListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventArtistRetrieve");
testEventArtistRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: countryList");
testCountryListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authUnfollowUser");
testAuthUnfollowUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: countryRetrieve");
testCountryRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: eventRetrieve");
testEventRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authStatus");
testAuthStatusWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: genreArtists");
testGenreArtistsWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: genreList");
testGenreListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: genreRetrieve");
testGenreRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: locationList");
testLocationListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: locationRetrieve");
testLocationRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: musicGet");
testMusicGetWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authList");
testAuthListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: postList");
testPostListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: postRetrieve");
testPostRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: searchGet");
testSearchGetWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: authFollowUser");
testAuthFollowUserWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistUnfollow");
testArtistUnfollowWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackFindRelated");
testTrackFindRelatedWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackLike");
testTrackLikeWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackList");
testTrackListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistRetrieve");
testArtistRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistList");
testArtistListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistFollow");
testArtistFollowWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackRepost");
testTrackRepostWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackRetrieve");
testTrackRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackTrending");
testTrackTrendingWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackUnlike");
testTrackUnlikeWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: trackUnrepost");
testTrackUnrepostWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: artistClaim");
testArtistClaimWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: venueList");
testVenueListWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
System.out.println("Calling endpoint: venueRetrieve");
testVenueRetrieveWeb();
sleep(1000); // sleep for 1s to avoid rate limiting, if any
}
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
DjsApiTestJava test = new DjsApiTestJava();
test.testAll();
}
}
// Run this file:
// cd DjsApi-java
// mvn compile exec:java -Dexec.mainClass="com.djs.devcms.DjsApiTestJava"// File: main.js
var fs = require('fs');
var client = require("swagger-client");
function testArtistCreateWeb() {
var args = {};
args['name'] = "sampleName"; // name
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['description'] = "sampleDescription"; // description
args['origin'] = "sampleOrigin"; // origin
args['tier'] = -2147483648; // tier
args['years_active'] = "sampleYearsActive"; // years_active
args['facebook'] = "sampleFacebook"; // facebook
args['instagram'] = "sampleInstagram"; // instagram
args['twitter'] = "sampleTwitter"; // twitter
args['website'] = "sampleWebsite"; // website
args['sk_id'] = "sampleSkId"; // sk_id
args['sk_on_tour_until'] = "sampleSkOnTourUntil"; // sk_on_tour_until
args['sk_uri'] = "sampleSkUri"; // sk_uri
args['management_contacts'] = "sampleManagementContacts"; // management_contacts
args['youtube'] = "sampleYoutube"; // youtube
args['itunes_link'] = "sampleItunesLink"; // itunes_link
args['first_name'] = "sampleFirstName"; // first_name
args['middle_name'] = "sampleMiddleName"; // middle_name
args['last_name'] = "sampleLastName"; // last_name
args['music_player'] = "sampleMusicPlayer"; // music_player
args['software'] = "sampleSoftware"; // software
args['headphones'] = "sampleHeadphones"; // headphones
args['has_mixbank'] = false; // has_mixbank
swagger.Web.artistCreate(args, function(response) {
/* success callback */
console.log("Result of Web.artistCreate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistCreate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackUpdateTrackWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['internal_id'] = "sampleInternalId"; // internal_id
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // Slug of track
args['title'] = "sampleTitle"; // Track Title
args['artwork_url'] = "sampleArtworkUrl"; // artwork_url
args['waveform_url'] = "sampleWaveformUrl"; // waveform_url
args['tag_list'] = "sampleTagList"; // tag_list
args['kind'] = "sampleKind"; // kind
args['genre'] = "sampleGenre"; // genre
args['state'] = "sampleState"; // state
args['description'] = "sampleDescription"; // Track Description
args['favoritings_count'] = -2147483648; // favoritings_count
args['playback_count'] = -2147483648; // playback_count
args['uploaded_on'] = "2014-12-31"; // uploaded_on
args['is_liked'] = false; // is_liked
args['is_reposted'] = false; // is_reposted
args['image_download_url'] = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['duration'] = "sampleDuration"; // Number of milliseconds of the track
args['original_content_size'] = "sampleOriginalContentSize"; // Original Content size
swagger.Web.trackUpdateTrack(args, function(response) {
/* success callback */
console.log("Result of Web.trackUpdateTrack");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackUpdateTrack:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistCreateDjWeb() {
var args = {};
args['name'] = "sampleName"; // DJ Name of artist
args['email'] = "sampleEmail"; // Email of artist
args['password'] = "samplePassword"; // Password
args['genre_ids'] = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['description'] = "sampleDescription"; // description
args['origin'] = "sampleOrigin"; // origin
args['tier'] = -2147483648; // tier
args['years_active'] = "sampleYearsActive"; // years_active
args['facebook'] = "sampleFacebook"; // facebook
args['instagram'] = "sampleInstagram"; // instagram
args['twitter'] = "sampleTwitter"; // twitter
args['website'] = "sampleWebsite"; // website
args['sk_id'] = "sampleSkId"; // sk_id
args['sk_on_tour_until'] = "sampleSkOnTourUntil"; // sk_on_tour_until
args['sk_uri'] = "sampleSkUri"; // sk_uri
args['management_contacts'] = "sampleManagementContacts"; // management_contacts
args['youtube'] = "sampleYoutube"; // youtube
args['itunes_link'] = "sampleItunesLink"; // itunes_link
args['first_name'] = "sampleFirstName"; // first_name
args['middle_name'] = "sampleMiddleName"; // middle_name
args['last_name'] = "sampleLastName"; // last_name
args['music_player'] = "sampleMusicPlayer"; // music_player
args['software'] = "sampleSoftware"; // software
args['headphones'] = "sampleHeadphones"; // headphones
args['has_mixbank'] = false; // has_mixbank
args['sound_cloud_id'] = "sampleSoundCloudId"; // Soundcloud internal ID
args['sound_cloud_url'] = "sampleSoundCloudUrl"; // Soundcloud URL
args['code'] = "sampleCode"; // Soundcloud auth code which will be converted to an access...
swagger.Web.artistCreateDj(args, function(response) {
/* success callback */
console.log("Result of Web.artistCreateDj");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistCreateDj:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistFinishClaimWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['name'] = "sampleName"; // name
args['email'] = "sampleEmail"; // New dj email
args['password'] = "samplePassword"; // New dj password
args['access_token'] = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['description'] = "sampleDescription"; // description
args['origin'] = "sampleOrigin"; // origin
args['tier'] = -2147483648; // tier
args['years_active'] = "sampleYearsActive"; // years_active
args['facebook'] = "sampleFacebook"; // facebook
args['instagram'] = "sampleInstagram"; // instagram
args['twitter'] = "sampleTwitter"; // twitter
args['website'] = "sampleWebsite"; // website
args['sk_id'] = "sampleSkId"; // sk_id
args['sk_on_tour_until'] = "sampleSkOnTourUntil"; // sk_on_tour_until
args['sk_uri'] = "sampleSkUri"; // sk_uri
args['management_contacts'] = "sampleManagementContacts"; // management_contacts
args['youtube'] = "sampleYoutube"; // youtube
args['itunes_link'] = "sampleItunesLink"; // itunes_link
args['first_name'] = "sampleFirstName"; // first_name
args['middle_name'] = "sampleMiddleName"; // middle_name
args['last_name'] = "sampleLastName"; // last_name
args['music_player'] = "sampleMusicPlayer"; // music_player
args['software'] = "sampleSoftware"; // software
args['headphones'] = "sampleHeadphones"; // headphones
args['has_mixbank'] = false; // has_mixbank
swagger.Web.artistFinishClaim(args, function(response) {
/* success callback */
console.log("Result of Web.artistFinishClaim");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistFinishClaim:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackPlayUpdateWeb() {
var args = {};
args['analytics_key'] = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
args['duration'] = "sampleDuration"; // Duration of the audio play session.
args['max_timecode'] = "sampleMaxTimecode"; // The max timecode played during this session.
swagger.Web.trackPlayUpdate(args, function(response) {
/* success callback */
console.log("Result of Web.trackPlayUpdate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackPlayUpdate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackPlayNextWeb() {
var args = {};
args['current_artist_sk_id'] = "sampleCurrentArtistSkId"; // Internal ID of the track
args['current_track_internal_id'] = "sampleCurrentTrackInternalId"; // SK ID of the artist
args['mode'] = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
args['ip_address'] = "sampleIpAddress"; // IP Address of requestor
args['genre_key'] = "sampleGenreKey"; // If you use genre as a mode, this is required
args['played_tracks'] = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
swagger.Web.trackPlayNext(args, function(response) {
/* success callback */
console.log("Result of Web.trackPlayNext");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackPlayNext:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackPlayWeb() {
var args = {};
args['artist_sk_id'] = "sampleArtistSkId"; // SK ID of the artist
args['track_internal_id'] = "sampleTrackInternalId"; // Internal ID of the track
args['ip_address'] = "sampleIpAddress"; // IP Address of requestor
swagger.Web.trackPlay(args, function(response) {
/* success callback */
console.log("Result of Web.trackPlay");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackPlay:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackDeleteTrackWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['internal_id'] = "sampleInternalId"; // internal_id
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['title'] = "sampleTitle"; // title
args['artwork_url'] = "sampleArtworkUrl"; // artwork_url
args['waveform_url'] = "sampleWaveformUrl"; // waveform_url
args['tag_list'] = "sampleTagList"; // tag_list
args['kind'] = "sampleKind"; // kind
args['genre'] = "sampleGenre"; // genre
args['state'] = "sampleState"; // state
args['description'] = "sampleDescription"; // description
args['favoritings_count'] = -2147483648; // favoritings_count
args['playback_count'] = -2147483648; // playback_count
args['uploaded_on'] = "2014-12-31"; // uploaded_on
args['is_liked'] = false; // is_liked
args['is_reposted'] = false; // is_reposted
swagger.Web.trackDeleteTrack(args, function(response) {
/* success callback */
console.log("Result of Web.trackDeleteTrack");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackDeleteTrack:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthAccessTokenWeb() {
var args = {};
args['api_secret'] = "sampleApiSecret"; // API Secret Given To Your App
args['api_key'] = "sampleApiKey"; // API Key Given To Your App
args['username'] = "sampleUsername"; // Username logging in
args['password'] = "samplePassword"; // Password logging in
swagger.Web.authAccessToken(args, function(response) {
/* success callback */
console.log("Result of Web.authAccessToken");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authAccessToken:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthCreateUserWeb() {
var args = {};
args['email'] = "sampleEmail"; // email address
args['password'] = "samplePassword"; // password
args['facebook_id'] = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
args['plan_slug'] = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
args['first_name'] = "sampleFirstName"; // First Name
args['last_name'] = "sampleLastName"; // Last Name
args['image_download_url'] = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
args['instagram'] = "sampleInstagram"; // instagram URL or slug
args['closest_location'] = "sampleClosestLocation"; // Users closest location with the slug of the location they...
args['facebook'] = "sampleFacebook"; // facebook URL or slug
args['website'] = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
args['twitter'] = "sampleTwitter"; // twitter URL or slug
args['description'] = "sampleDescription"; // Stream user profile description
swagger.Web.authCreateUser(args, function(response) {
/* success callback */
console.log("Result of Web.authCreateUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authCreateUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackCreateTrackWeb() {
var args = {};
args['title'] = "sampleTitle"; // Track Title
args['internal_id'] = "sampleInternalId"; // internal_id
args['description'] = "sampleDescription"; // Track Description
args['image_download_url'] = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['duration'] = "sampleDuration"; // Number of milliseconds of the track
args['original_content_size'] = "sampleOriginalContentSize"; // Original Content size
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['tag_list'] = "sampleTagList"; // tag_list
args['waveform_url'] = "sampleWaveformUrl"; // waveform_url
args['slug'] = "sampleSlug"; // slug
args['artwork_url'] = "sampleArtworkUrl"; // artwork_url
args['playback_count'] = -2147483648; // playback_count
args['state'] = "sampleState"; // state
args['favoritings_count'] = -2147483648; // favoritings_count
args['genre'] = "sampleGenre"; // genre
args['kind'] = "sampleKind"; // kind
args['uploaded_on'] = "2014-12-31"; // uploaded_on
args['is_liked'] = false; // is_liked
args['is_reposted'] = false; // is_reposted
swagger.Web.trackCreateTrack(args, function(response) {
/* success callback */
console.log("Result of Web.trackCreateTrack");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackCreateTrack:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testNewsletterSignupCreateWeb() {
var args = {};
args['email'] = "sampleEmail"; // Contact Email
args['name'] = "sampleName"; // Contact Name
args['list_override'] = "sampleListOverride"; // Mailchimp override
swagger.Web.newsletterSignupCreate(args, function(response) {
/* success callback */
console.log("Result of Web.newsletterSignupCreate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.newsletterSignupCreate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthResetPasswordCompleteWeb() {
var args = {};
args['token'] = "sampleToken"; // Token
args['new_password'] = "sampleNewPassword"; // New Password
args['email'] = "sampleEmail"; // Email
swagger.Web.authResetPasswordComplete(args, function(response) {
/* success callback */
console.log("Result of Web.authResetPasswordComplete");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authResetPasswordComplete:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthResetPasswordSendEmailWeb() {
var args = {};
args['email'] = "sampleEmail"; // User email
swagger.Web.authResetPasswordSendEmail(args, function(response) {
/* success callback */
console.log("Result of Web.authResetPasswordSendEmail");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authResetPasswordSendEmail:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventUpdateEventWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['display_name'] = "sampleDisplayName"; // Event Display Name
args['event_date_start'] = "2014-12-31"; // event_date_start
args['event_date_end'] = "2014-12-31"; // event_date_end
args['event_end_time'] = "sampleEventEndTime"; // event_end_time
args['event_start_time'] = "sampleEventStartTime"; // event_start_time
args['sk_id'] = "sampleSkId"; // sk_id
args['event_type'] = "sampleEventType"; // event_type
args['age_restriction'] = "sampleAgeRestriction"; // age_restriction
args['series_name'] = "sampleSeriesName"; // series_name
args['popularity'] = "samplePopularity"; // popularity
args['uri'] = "sampleUri"; // URI of the ticket link
args['disabled'] = false; // disabled
args['venue'] = "sampleVenue"; // venue
args['image_thumbnail_download_url'] = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['image_jumbotron_download_url'] = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
args['venue_slug'] = "sampleVenueSlug"; // Slug of the venue
args['event_date'] = "sampleEventDate"; // US Date formatted Date
args['event_time'] = "sampleEventTime"; // Military time of event start
args['artist_slug'] = "sampleArtistSlug"; // Artist creating this item
swagger.Web.eventUpdateEvent(args, function(response) {
/* success callback */
console.log("Result of Web.eventUpdateEvent");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventUpdateEvent:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventDeleteEventWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['display_name'] = "sampleDisplayName"; // display_name
args['event_date_start'] = "2014-12-31"; // event_date_start
args['event_date_end'] = "2014-12-31"; // event_date_end
args['event_end_time'] = "sampleEventEndTime"; // event_end_time
args['event_start_time'] = "sampleEventStartTime"; // event_start_time
args['sk_id'] = "sampleSkId"; // sk_id
args['event_type'] = "sampleEventType"; // event_type
args['age_restriction'] = "sampleAgeRestriction"; // age_restriction
args['series_name'] = "sampleSeriesName"; // series_name
args['popularity'] = "samplePopularity"; // popularity
args['uri'] = "sampleUri"; // uri
args['disabled'] = false; // disabled
args['venue'] = "sampleVenue"; // venue
swagger.Web.eventDeleteEvent(args, function(response) {
/* success callback */
console.log("Result of Web.eventDeleteEvent");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventDeleteEvent:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthUpdateArtistUserWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['itunes_link'] = "sampleItunesLink"; // Itunes URL (Fully qualified)
args['youtube'] = "sampleYoutube"; // youtube Slug
args['contact_email'] = "sampleContactEmail"; // Email business contact
args['dj_name'] = "sampleDjName"; // DJ Name
args['payment_address1'] = "samplePaymentAddress1"; // Payment Address 1
args['payment_address2'] = "samplePaymentAddress2"; // Payment Address 2
args['payment_city'] = "samplePaymentCity"; // Payment City
args['payment_state'] = "samplePaymentState"; // Payment State
args['payment_zip'] = "samplePaymentZip"; // Payment Zip
args['country'] = "sampleCountry"; // Country Code
args['soundcloud_username'] = "sampleSoundcloudUsername"; // Soundcloud username
args['payment_ein'] = "samplePaymentEin"; // Payment EIN Number
args['email'] = "sampleEmail"; // email address in which the user logs in as
args['password'] = "samplePassword"; // password
args['first_name'] = "sampleFirstName"; // First Name
args['plan_slug'] = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
args['slug'] = "sampleSlug"; // User slug
args['last_name'] = "sampleLastName"; // Last Name
args['image_download_url'] = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
args['instagram'] = "sampleInstagram"; // instagram URL or slug
args['facebook'] = "sampleFacebook"; // facebook URL or slug
args['website'] = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
args['twitter'] = "sampleTwitter"; // twitter URL or slug
args['description'] = "sampleDescription"; // User profile description
swagger.Web.authUpdateArtistUser(args, function(response) {
/* success callback */
console.log("Result of Web.authUpdateArtistUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authUpdateArtistUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthUpdateUserWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['closest_location'] = "sampleClosestLocation"; // Update users closest location with the slug of the...
args['email'] = "sampleEmail"; // email address in which the user logs in as
args['password'] = "samplePassword"; // password
args['first_name'] = "sampleFirstName"; // First Name
args['plan_slug'] = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
args['slug'] = "sampleSlug"; // User slug
args['last_name'] = "sampleLastName"; // Last Name
args['image_download_url'] = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
args['instagram'] = "sampleInstagram"; // instagram URL or slug
args['facebook'] = "sampleFacebook"; // facebook URL or slug
args['website'] = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
args['twitter'] = "sampleTwitter"; // twitter URL or slug
args['description'] = "sampleDescription"; // User profile description
swagger.Web.authUpdateUser(args, function(response) {
/* success callback */
console.log("Result of Web.authUpdateUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authUpdateUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthViewArtistUserWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['with_favorites'] = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
args['favorite_page'] = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
args['favorite_per_page'] = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
args['with_following'] = "sampleWithFollowing"; // Fetch favorites the "following" index.
args['following_page'] = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
args['following_per_page'] = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
args['with_following_users'] = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
args['following_users_page'] = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
args['following_users_per_page'] = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_artist_followers'] = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
args['artist_followers_page'] = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
args['artist_followers_per_page'] = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
swagger.Web.authViewArtistUser(args, function(response) {
/* success callback */
console.log("Result of Web.authViewArtistUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authViewArtistUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthViewUserWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['with_favorites'] = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
args['favorite_page'] = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
args['favorite_per_page'] = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
args['with_following'] = "sampleWithFollowing"; // Fetch favorites the "following" index.
args['following_page'] = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
args['following_per_page'] = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
args['with_following_users'] = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
args['following_users_page'] = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
args['following_users_per_page'] = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_artist_followers'] = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
args['artist_followers_page'] = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
args['artist_followers_per_page'] = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
swagger.Web.authViewUser(args, function(response) {
/* success callback */
console.log("Result of Web.authViewUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authViewUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testContactEntryCreateWeb() {
var args = {};
args['name'] = "sampleName"; // Contact Name
args['email'] = "sampleEmail"; // Contact Email
args['comments'] = "sampleComments"; // Comments
args['phone'] = "samplePhone"; // Contact Phone
swagger.Web.contactEntryCreate(args, function(response) {
/* success callback */
console.log("Result of Web.contactEntryCreate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.contactEntryCreate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventCreateEventWeb() {
var args = {};
args['display_name'] = "sampleDisplayName"; // Event Display Name
args['uri'] = "sampleUri"; // URI of the ticket link
args['image_thumbnail_download_url'] = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['image_jumbotron_download_url'] = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
args['venue_slug'] = "sampleVenueSlug"; // Slug of the venue
args['event_date'] = "sampleEventDate"; // US Date formatted Date
args['event_time'] = "sampleEventTime"; // Military time of event start
args['artist_slug'] = "sampleArtistSlug"; // Artist creating this item
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['event_date_start'] = "2014-12-31"; // event_date_start
args['event_date_end'] = "2014-12-31"; // event_date_end
args['event_end_time'] = "sampleEventEndTime"; // event_end_time
args['event_start_time'] = "sampleEventStartTime"; // event_start_time
args['sk_id'] = "sampleSkId"; // sk_id
args['event_type'] = "sampleEventType"; // event_type
args['series_name'] = "sampleSeriesName"; // series_name
args['popularity'] = "samplePopularity"; // popularity
args['age_restriction'] = "sampleAgeRestriction"; // age_restriction
args['disabled'] = false; // disabled
args['venue'] = "sampleVenue"; // venue
swagger.Web.eventCreateEvent(args, function(response) {
/* success callback */
console.log("Result of Web.eventCreateEvent");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventCreateEvent:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artists__artist__slug'] = "sampleArtistsArtistSlug"; // Filter by artist slug
swagger.Web.eventList(args, function(response) {
/* success callback */
console.log("Result of Web.eventList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testDjTierGetWeb() {
var args = {};
args['page'] = "samplePage"; // How many results to be returned in each category
args['genre'] = "sampleGenre"; // Which genre key to filter on
args['genre_id'] = "sampleGenreId"; // Which genre id/pk to filter on
swagger.Web.djTierGet(args, function(response) {
/* success callback */
console.log("Result of Web.djTierGet");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.djTierGet:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventArtistListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['display_name'] = "sampleDisplayName"; // Search by display name of artist
swagger.Web.eventArtistList(args, function(response) {
/* success callback */
console.log("Result of Web.eventArtistList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventArtistList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventArtistRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.eventArtistRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.eventArtistRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventArtistRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testCountryListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
swagger.Web.countryList(args, function(response) {
/* success callback */
console.log("Result of Web.countryList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.countryList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthUnfollowUserWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.authUnfollowUser(args, function(response) {
/* success callback */
console.log("Result of Web.authUnfollowUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authUnfollowUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testCountryRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.countryRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.countryRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.countryRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testEventRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.eventRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.eventRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthStatusWeb() {
var args = {};
swagger.Web.authStatus(args, function(response) {
/* success callback */
console.log("Result of Web.authStatus");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authStatus:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testGenreArtistsWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.genreArtists(args, function(response) {
/* success callback */
console.log("Result of Web.genreArtists");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.genreArtists:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testGenreListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
swagger.Web.genreList(args, function(response) {
/* success callback */
console.log("Result of Web.genreList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.genreList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testGenreRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.genreRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.genreRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.genreRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testLocationListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['selectable'] = false; // Selectable are the locations that we have designated are...
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_start_date'] = "sampleEventStartDate"; // Start date range (end date range required if start is...
args['event_end_date'] = "sampleEventEndDate"; // End date range (start date range required if start is...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_featured_events'] = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
args['with_featured_venues'] = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
args['with_venues'] = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
args['venue_page'] = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
args['venues_per_page'] = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
args['exclusive_venues'] = false; // Boolean flag used to show which venues we have full blown...
swagger.Web.locationList(args, function(response) {
/* success callback */
console.log("Result of Web.locationList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.locationList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testLocationRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['selectable'] = false; // Selectable are the locations that we have designated are...
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_start_date'] = "sampleEventStartDate"; // Start date range (end date range required if start is...
args['event_end_date'] = "sampleEventEndDate"; // End date range (start date range required if start is...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_featured_events'] = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
args['with_featured_venues'] = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
args['with_venues'] = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
args['venue_page'] = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
args['venues_per_page'] = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
args['exclusive_venues'] = false; // Boolean flag used to show which venues we have full blown...
swagger.Web.locationRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.locationRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.locationRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testMusicGetWeb() {
var args = {};
args['page'] = "samplePage"; // How many results to be returned in each category
swagger.Web.musicGet(args, function(response) {
/* success callback */
console.log("Result of Web.musicGet");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.musicGet:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthListWeb() {
var args = {};
swagger.Web.authList(args, function(response) {
/* success callback */
console.log("Result of Web.authList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testPostListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['author__id'] = "sampleAuthorId"; // ID of author to filter
args['category__title'] = "sampleCategoryTitle"; // Category string to filter by
args['title'] = "sampleTitle"; // Filter by blog post title
args['featured_posts'] = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
args['is_draft'] = "sampleIsDraft"; // Filter by is_draft
swagger.Web.postList(args, function(response) {
/* success callback */
console.log("Result of Web.postList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.postList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testPostRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.postRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.postRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.postRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testSearchGetWeb() {
var args = {};
args['q'] = "sampleQ"; // Search criteria
args['per_page'] = "samplePerPage"; // How many results to be returned in each category
args['without_events'] = "sampleWithoutEvents"; // Skip showing the "event" index.
args['without_tracks'] = "sampleWithoutTracks"; // Skip showing the "track" index.
args['without_artists'] = "sampleWithoutArtists"; // Skip showing the "artist" index.
args['without_venues'] = "sampleWithoutVenues"; // Skip showing the "venue" index.
args['without_users'] = "sampleWithoutUsers"; // Skip showing the "users" index.
swagger.Web.searchGet(args, function(response) {
/* success callback */
console.log("Result of Web.searchGet");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.searchGet:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testAuthFollowUserWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.authFollowUser(args, function(response) {
/* success callback */
console.log("Result of Web.authFollowUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authFollowUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistUnfollowWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.artistUnfollow(args, function(response) {
/* success callback */
console.log("Result of Web.artistUnfollow");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistUnfollow:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackFindRelatedWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['find_related'] = "sampleFindRelated"; // Find all related tracks for a given single track
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artist__slug'] = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
args['my_followed_djs'] = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
args['artist__id'] = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
args['artist__genres__key'] = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
args['artist__genres__id'] = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
args['reposted_by'] = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
args['listened_by'] = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
swagger.Web.trackFindRelated(args, function(response) {
/* success callback */
console.log("Result of Web.trackFindRelated");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackFindRelated:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackLikeWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackLike(args, function(response) {
/* success callback */
console.log("Result of Web.trackLike");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackLike:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['find_related'] = "sampleFindRelated"; // Find all related tracks for a given single track
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artist__slug'] = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
args['my_followed_djs'] = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
args['artist__id'] = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
args['artist__genres__key'] = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
args['artist__genres__id'] = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
args['reposted_by'] = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
args['listened_by'] = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
swagger.Web.trackList(args, function(response) {
/* success callback */
console.log("Result of Web.trackList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_tracks'] = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
args['track_page'] = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
args['with_featured_tracks'] = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
args['featured_track_page'] = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
args['featured_track_per_page'] = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
args['track_per_page'] = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_artist_followers'] = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
args['artist_followers_page'] = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
args['artist_followers_per_page'] = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
swagger.Web.artistRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.artistRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['genres__key'] = "sampleGenresKey"; // Filter artists by genre key
args['tier'] = "sampleTier"; // Filter by artist tier
args['with_events'] = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_tracks'] = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
args['track_page'] = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
args['with_featured_tracks'] = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
args['featured_track_page'] = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
args['featured_track_per_page'] = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
args['track_per_page'] = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_following'] = "sampleWithFollowing"; // Fetch favorites the "following" index.
args['following_page'] = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
args['following_per_page'] = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
args['with_following_users'] = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
args['following_users_page'] = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
args['following_users_per_page'] = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
swagger.Web.artistList(args, function(response) {
/* success callback */
console.log("Result of Web.artistList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistFollowWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.artistFollow(args, function(response) {
/* success callback */
console.log("Result of Web.artistFollow");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistFollow:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackRepostWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackRepost(args, function(response) {
/* success callback */
console.log("Result of Web.trackRepost");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackRepost:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.trackRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackTrendingWeb() {
var args = {};
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['find_related'] = "sampleFindRelated"; // Find all related tracks for a given single track
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artist__slug'] = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
args['my_followed_djs'] = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
args['artist__id'] = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
args['artist__genres__key'] = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
args['artist__genres__id'] = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
args['reposted_by'] = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
args['listened_by'] = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
args['trending__genres__key'] = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
args['trending__genres__id'] = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
swagger.Web.trackTrending(args, function(response) {
/* success callback */
console.log("Result of Web.trackTrending");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackTrending:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackUnlikeWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackUnlike(args, function(response) {
/* success callback */
console.log("Result of Web.trackUnlike");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackUnlike:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testTrackUnrepostWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackUnrepost(args, function(response) {
/* success callback */
console.log("Result of Web.trackUnrepost");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackUnrepost:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testArtistClaimWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['code'] = "sampleCode"; // Soundcloud auth code which will be converted to an access...
swagger.Web.artistClaim(args, function(response) {
/* success callback */
console.log("Result of Web.artistClaim");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistClaim:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testVenueListWeb() {
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['event_ordering'] = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
args['exclusive'] = false; // Boolean flag used to show which venues we have full blown...
args['location__slug'] = "sampleLocationSlug"; // Filter by venue location slug
args['with_events'] = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
swagger.Web.venueList(args, function(response) {
/* success callback */
console.log("Result of Web.venueList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.venueList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function testVenueRetrieveWeb() {
var args = {};
args['pk'] = "samplePk"; // pk
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_ordering'] = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
swagger.Web.venueRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.venueRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.venueRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
}
function main() {
/* Resource: Web */
console.log("Calling endpoint: artistCreate");
testArtistCreateWeb();
console.log("Calling endpoint: trackUpdateTrack");
testTrackUpdateTrackWeb();
console.log("Calling endpoint: artistCreateDj");
testArtistCreateDjWeb();
console.log("Calling endpoint: artistFinishClaim");
testArtistFinishClaimWeb();
console.log("Calling endpoint: trackPlayUpdate");
testTrackPlayUpdateWeb();
console.log("Calling endpoint: trackPlayNext");
testTrackPlayNextWeb();
console.log("Calling endpoint: trackPlay");
testTrackPlayWeb();
console.log("Calling endpoint: trackDeleteTrack");
testTrackDeleteTrackWeb();
console.log("Calling endpoint: authAccessToken");
testAuthAccessTokenWeb();
console.log("Calling endpoint: authCreateUser");
testAuthCreateUserWeb();
console.log("Calling endpoint: trackCreateTrack");
testTrackCreateTrackWeb();
console.log("Calling endpoint: newsletterSignupCreate");
testNewsletterSignupCreateWeb();
console.log("Calling endpoint: authResetPasswordComplete");
testAuthResetPasswordCompleteWeb();
console.log("Calling endpoint: authResetPasswordSendEmail");
testAuthResetPasswordSendEmailWeb();
console.log("Calling endpoint: eventUpdateEvent");
testEventUpdateEventWeb();
console.log("Calling endpoint: eventDeleteEvent");
testEventDeleteEventWeb();
console.log("Calling endpoint: authUpdateArtistUser");
testAuthUpdateArtistUserWeb();
console.log("Calling endpoint: authUpdateUser");
testAuthUpdateUserWeb();
console.log("Calling endpoint: authViewArtistUser");
testAuthViewArtistUserWeb();
console.log("Calling endpoint: authViewUser");
testAuthViewUserWeb();
console.log("Calling endpoint: contactEntryCreate");
testContactEntryCreateWeb();
console.log("Calling endpoint: eventCreateEvent");
testEventCreateEventWeb();
console.log("Calling endpoint: eventList");
testEventListWeb();
console.log("Calling endpoint: djTierGet");
testDjTierGetWeb();
console.log("Calling endpoint: eventArtistList");
testEventArtistListWeb();
console.log("Calling endpoint: eventArtistRetrieve");
testEventArtistRetrieveWeb();
console.log("Calling endpoint: countryList");
testCountryListWeb();
console.log("Calling endpoint: authUnfollowUser");
testAuthUnfollowUserWeb();
console.log("Calling endpoint: countryRetrieve");
testCountryRetrieveWeb();
console.log("Calling endpoint: eventRetrieve");
testEventRetrieveWeb();
console.log("Calling endpoint: authStatus");
testAuthStatusWeb();
console.log("Calling endpoint: genreArtists");
testGenreArtistsWeb();
console.log("Calling endpoint: genreList");
testGenreListWeb();
console.log("Calling endpoint: genreRetrieve");
testGenreRetrieveWeb();
console.log("Calling endpoint: locationList");
testLocationListWeb();
console.log("Calling endpoint: locationRetrieve");
testLocationRetrieveWeb();
console.log("Calling endpoint: musicGet");
testMusicGetWeb();
console.log("Calling endpoint: authList");
testAuthListWeb();
console.log("Calling endpoint: postList");
testPostListWeb();
console.log("Calling endpoint: postRetrieve");
testPostRetrieveWeb();
console.log("Calling endpoint: searchGet");
testSearchGetWeb();
console.log("Calling endpoint: authFollowUser");
testAuthFollowUserWeb();
console.log("Calling endpoint: artistUnfollow");
testArtistUnfollowWeb();
console.log("Calling endpoint: trackFindRelated");
testTrackFindRelatedWeb();
console.log("Calling endpoint: trackLike");
testTrackLikeWeb();
console.log("Calling endpoint: trackList");
testTrackListWeb();
console.log("Calling endpoint: artistRetrieve");
testArtistRetrieveWeb();
console.log("Calling endpoint: artistList");
testArtistListWeb();
console.log("Calling endpoint: artistFollow");
testArtistFollowWeb();
console.log("Calling endpoint: trackRepost");
testTrackRepostWeb();
console.log("Calling endpoint: trackRetrieve");
testTrackRetrieveWeb();
console.log("Calling endpoint: trackTrending");
testTrackTrendingWeb();
console.log("Calling endpoint: trackUnlike");
testTrackUnlikeWeb();
console.log("Calling endpoint: trackUnrepost");
testTrackUnrepostWeb();
console.log("Calling endpoint: artistClaim");
testArtistClaimWeb();
console.log("Calling endpoint: venueList");
testVenueListWeb();
console.log("Calling endpoint: venueRetrieve");
testVenueRetrieveWeb();
}
var swagger = new client({
url: 'http://files1.restunited.com/libraries/djs_api_20160314191602/prod/2/0/0/sw/swagger2/swagger.json',
success: function() {
// configure authentications
swagger.clientAuthorizations.add("Default", new client.ApiKeyAuthorization("Authorization", "Token YOUR_API_KEY", "header"));
// run all tests
main();
}
});
// Run this file:
// node main.js// In SWGDjsApiTest.h
#import <Foundation/Foundation.h>
#import <DjsApi/SWGApiClient.h>
#import <DjsApi/SWGConfiguration.h>
// load models (response) defined for endpoints
#import <DjsApi/SWGVenuePaginationSerializer.h>
#import <DjsApi/SWGTrackPlayUpdateResponseSerializer.h>
#import <DjsApi/SWGTrackPlayResponseSerializer.h>
#import <DjsApi/SWGTrackPaginationSerializer.h>
#import <DjsApi/SWGSearchSerializer.h>
#import <DjsApi/SWGNewsletterSignupSerializer.h>
#import <DjsApi/SWGNewsletterSignupChangeRecordSerializer.h>
#import <DjsApi/SWGFeaturedTrackSerializer.h>
#import <DjsApi/SWGMusicSerializer.h>
#import <DjsApi/SWGLocationPaginationSerializer.h>
#import <DjsApi/SWGGenrePaginationSerializer.h>
#import <DjsApi/SWGEventPaginationSerializer.h>
#import <DjsApi/SWGDjTierSerializer.h>
#import <DjsApi/SWGGenreSerializer.h>
#import <DjsApi/SWGFeaturedArtistSerializer.h>
#import <DjsApi/SWGCountrySerializer.h>
#import <DjsApi/SWGCountryPaginationSerializer.h>
#import <DjsApi/SWGContactEntryChangeRecordSerializer.h>
#import <DjsApi/SWGContactEntrySerializer.h>
#import <DjsApi/SWGPostPaginationSerializer.h>
#import <DjsApi/SWGPostSerializer.h>
#import <DjsApi/SWGFavoriteTrackSerializer.h>
#import <DjsApi/SWGSuccessSerializer.h>
#import <DjsApi/SWGErrorResponseSerializer.h>
#import <DjsApi/SWGActiveUserSerializer.h>
#import <DjsApi/SWGAuthIndexResponseSerializer.h>
#import <DjsApi/SWGFollowingArtistSerializer.h>
#import <DjsApi/SWGAuthStatusResponseSerializer.h>
#import <DjsApi/SWGAuthResponseSerializer.h>
#import <DjsApi/SWGActiveArtistSerializer.h>
#import <DjsApi/SWGFeaturedEventSerializer.h>
#import <DjsApi/SWGSoundCloudSerializer.h>
#import <DjsApi/SWGVenueEventSerializer.h>
#import <DjsApi/SWGTrackArtistSerializer.h>
#import <DjsApi/SWGTrackSerializer.h>
#import <DjsApi/SWGMessageSerializer.h>
#import <DjsApi/SWGArtistPaginationSerializer.h>
#import <DjsApi/SWGEventArtistSerializer.h>
#import <DjsApi/SWGArtistSerializer.h>
#import <DjsApi/SWGVenueSerializer.h>
#import <DjsApi/SWGArtistChangeRecordSerializer.h>
#import <DjsApi/SWGSuccessAndErrorSerializer.h>
#import <DjsApi/SWGFeaturedVenueSerializer.h>
#import <DjsApi/SWGEventSerializer.h>
#import <DjsApi/SWGClaimSerializer.h>
#import <DjsApi/SWGFollowerSerializer.h>
#import <DjsApi/SWGVenueLocationSerializer.h>
#import <DjsApi/SWGGenreArtistSerializer.h>
#import <DjsApi/SWGLocationSerializer.h>
// load classes for accessing the endpoints
#import <DjsApi/SWGWebApi.h>
@interface SWGDjsApiTest : NSObject
- (void) testArtistCreateWeb;
- (void) testTrackUpdateTrackWeb;
- (void) testArtistCreateDjWeb;
- (void) testArtistFinishClaimWeb;
- (void) testTrackPlayUpdateWeb;
- (void) testTrackPlayNextWeb;
- (void) testTrackPlayWeb;
- (void) testTrackDeleteTrackWeb;
- (void) testAuthAccessTokenWeb;
- (void) testAuthCreateUserWeb;
- (void) testTrackCreateTrackWeb;
- (void) testNewsletterSignupCreateWeb;
- (void) testAuthResetPasswordCompleteWeb;
- (void) testAuthResetPasswordSendEmailWeb;
- (void) testEventUpdateEventWeb;
- (void) testEventDeleteEventWeb;
- (void) testAuthUpdateArtistUserWeb;
- (void) testAuthUpdateUserWeb;
- (void) testAuthViewArtistUserWeb;
- (void) testAuthViewUserWeb;
- (void) testContactEntryCreateWeb;
- (void) testEventCreateEventWeb;
- (void) testEventListWeb;
- (void) testDjTierGetWeb;
- (void) testEventArtistListWeb;
- (void) testEventArtistRetrieveWeb;
- (void) testCountryListWeb;
- (void) testAuthUnfollowUserWeb;
- (void) testCountryRetrieveWeb;
- (void) testEventRetrieveWeb;
- (void) testAuthStatusWeb;
- (void) testGenreArtistsWeb;
- (void) testGenreListWeb;
- (void) testGenreRetrieveWeb;
- (void) testLocationListWeb;
- (void) testLocationRetrieveWeb;
- (void) testMusicGetWeb;
- (void) testAuthListWeb;
- (void) testPostListWeb;
- (void) testPostRetrieveWeb;
- (void) testSearchGetWeb;
- (void) testAuthFollowUserWeb;
- (void) testArtistUnfollowWeb;
- (void) testTrackFindRelatedWeb;
- (void) testTrackLikeWeb;
- (void) testTrackListWeb;
- (void) testArtistRetrieveWeb;
- (void) testArtistListWeb;
- (void) testArtistFollowWeb;
- (void) testTrackRepostWeb;
- (void) testTrackRetrieveWeb;
- (void) testTrackTrendingWeb;
- (void) testTrackUnlikeWeb;
- (void) testTrackUnrepostWeb;
- (void) testArtistClaimWeb;
- (void) testVenueListWeb;
- (void) testVenueRetrieveWeb;
- (void) main;
@end
// In SWGDjsApiTest.m
#import "SWGDjsApiTest.h"
@implementation SWGDjsApiTest
- (void) testArtistCreateWeb {
NSString *name = @"sampleName"; // name
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *description = @"sampleDescription"; // description
NSString *origin = @"sampleOrigin"; // origin
NSNumber *tier = @-2147483648; // tier
NSString *yearsActive = @"sampleYearsActive"; // years_active
NSString *facebook = @"sampleFacebook"; // facebook
NSString *instagram = @"sampleInstagram"; // instagram
NSString *twitter = @"sampleTwitter"; // twitter
NSString *website = @"sampleWebsite"; // website
NSString *skId = @"sampleSkId"; // sk_id
NSString *skOnTourUntil = @"sampleSkOnTourUntil"; // sk_on_tour_until
NSString *skUri = @"sampleSkUri"; // sk_uri
NSString *managementContacts = @"sampleManagementContacts"; // management_contacts
NSString *youtube = @"sampleYoutube"; // youtube
NSString *itunesLink = @"sampleItunesLink"; // itunes_link
NSString *firstName = @"sampleFirstName"; // first_name
NSString *middleName = @"sampleMiddleName"; // middle_name
NSString *lastName = @"sampleLastName"; // last_name
NSString *musicPlayer = @"sampleMusicPlayer"; // music_player
NSString *software = @"sampleSoftware"; // software
NSString *headphones = @"sampleHeadphones"; // headphones
NSNumber *hasMixbank = @NO; // has_mixbank
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistCreateWithCompletionBlock:name
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
description:description
origin:origin
tier:tier
yearsActive:yearsActive
facebook:facebook
instagram:instagram
twitter:twitter
website:website
skId:skId
skOnTourUntil:skOnTourUntil
skUri:skUri
managementContacts:managementContacts
youtube:youtube
itunesLink:itunesLink
firstName:firstName
middleName:middleName
lastName:lastName
musicPlayer:musicPlayer
software:software
headphones:headphones
hasMixbank:hasMixbank
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackUpdateTrackWeb {
NSString *pk = @"samplePk"; // pk
NSString *internalId = @"sampleInternalId"; // internal_id
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // Slug of track
NSString *title = @"sampleTitle"; // Track Title
NSString *artworkUrl = @"sampleArtworkUrl"; // artwork_url
NSString *waveformUrl = @"sampleWaveformUrl"; // waveform_url
NSString *tagList = @"sampleTagList"; // tag_list
NSString *kind = @"sampleKind"; // kind
NSString *genre = @"sampleGenre"; // genre
NSString *state = @"sampleState"; // state
NSString *description = @"sampleDescription"; // Track Description
NSNumber *favoritingsCount = @-2147483648; // favoritings_count
NSNumber *playbackCount = @-2147483648; // playback_count
NSDate *uploadedOn = @"sampleUploadedOn"; // uploaded_on
NSNumber *isLiked = @NO; // is_liked
NSNumber *isReposted = @NO; // is_reposted
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *duration = @"sampleDuration"; // Number of milliseconds of the track
NSString *originalContentSize = @"sampleOriginalContentSize"; // Original Content size
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackUpdateTrackWithCompletionBlock:pk
internalId:internalId
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
title:title
artworkUrl:artworkUrl
waveformUrl:waveformUrl
tagList:tagList
kind:kind
genre:genre
state:state
description:description
favoritingsCount:favoritingsCount
playbackCount:playbackCount
uploadedOn:uploadedOn
isLiked:isLiked
isReposted:isReposted
imageDownloadUrl:imageDownloadUrl
duration:duration
originalContentSize:originalContentSize
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistCreateDjWeb {
NSString *name = @"sampleName"; // DJ Name of artist
NSString *email = @"sampleEmail"; // Email of artist
NSString *password = @"samplePassword"; // Password
NSString *genreIds = @"sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *description = @"sampleDescription"; // description
NSString *origin = @"sampleOrigin"; // origin
NSNumber *tier = @-2147483648; // tier
NSString *yearsActive = @"sampleYearsActive"; // years_active
NSString *facebook = @"sampleFacebook"; // facebook
NSString *instagram = @"sampleInstagram"; // instagram
NSString *twitter = @"sampleTwitter"; // twitter
NSString *website = @"sampleWebsite"; // website
NSString *skId = @"sampleSkId"; // sk_id
NSString *skOnTourUntil = @"sampleSkOnTourUntil"; // sk_on_tour_until
NSString *skUri = @"sampleSkUri"; // sk_uri
NSString *managementContacts = @"sampleManagementContacts"; // management_contacts
NSString *youtube = @"sampleYoutube"; // youtube
NSString *itunesLink = @"sampleItunesLink"; // itunes_link
NSString *firstName = @"sampleFirstName"; // first_name
NSString *middleName = @"sampleMiddleName"; // middle_name
NSString *lastName = @"sampleLastName"; // last_name
NSString *musicPlayer = @"sampleMusicPlayer"; // music_player
NSString *software = @"sampleSoftware"; // software
NSString *headphones = @"sampleHeadphones"; // headphones
NSNumber *hasMixbank = @NO; // has_mixbank
NSString *soundCloudId = @"sampleSoundCloudId"; // Soundcloud internal ID
NSString *soundCloudUrl = @"sampleSoundCloudUrl"; // Soundcloud URL
NSString *code = @"sampleCode"; // Soundcloud auth code which will be converted to an access...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistCreateDjWithCompletionBlock:name
email:email
password:password
genreIds:genreIds
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
description:description
origin:origin
tier:tier
yearsActive:yearsActive
facebook:facebook
instagram:instagram
twitter:twitter
website:website
skId:skId
skOnTourUntil:skOnTourUntil
skUri:skUri
managementContacts:managementContacts
youtube:youtube
itunesLink:itunesLink
firstName:firstName
middleName:middleName
lastName:lastName
musicPlayer:musicPlayer
software:software
headphones:headphones
hasMixbank:hasMixbank
soundCloudId:soundCloudId
soundCloudUrl:soundCloudUrl
code:code
completionHandler:^(SWGArtistChangeRecordSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistFinishClaimWeb {
NSString *pk = @"samplePk"; // pk
NSString *name = @"sampleName"; // name
NSString *email = @"sampleEmail"; // New dj email
NSString *password = @"samplePassword"; // New dj password
NSString *accessToken = @"sampleAccessToken"; // Soundcloud access token given back to you on first claim...
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *description = @"sampleDescription"; // description
NSString *origin = @"sampleOrigin"; // origin
NSNumber *tier = @-2147483648; // tier
NSString *yearsActive = @"sampleYearsActive"; // years_active
NSString *facebook = @"sampleFacebook"; // facebook
NSString *instagram = @"sampleInstagram"; // instagram
NSString *twitter = @"sampleTwitter"; // twitter
NSString *website = @"sampleWebsite"; // website
NSString *skId = @"sampleSkId"; // sk_id
NSString *skOnTourUntil = @"sampleSkOnTourUntil"; // sk_on_tour_until
NSString *skUri = @"sampleSkUri"; // sk_uri
NSString *managementContacts = @"sampleManagementContacts"; // management_contacts
NSString *youtube = @"sampleYoutube"; // youtube
NSString *itunesLink = @"sampleItunesLink"; // itunes_link
NSString *firstName = @"sampleFirstName"; // first_name
NSString *middleName = @"sampleMiddleName"; // middle_name
NSString *lastName = @"sampleLastName"; // last_name
NSString *musicPlayer = @"sampleMusicPlayer"; // music_player
NSString *software = @"sampleSoftware"; // software
NSString *headphones = @"sampleHeadphones"; // headphones
NSNumber *hasMixbank = @NO; // has_mixbank
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistFinishClaimWithCompletionBlock:pk
name:name
email:email
password:password
accessToken:accessToken
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
description:description
origin:origin
tier:tier
yearsActive:yearsActive
facebook:facebook
instagram:instagram
twitter:twitter
website:website
skId:skId
skOnTourUntil:skOnTourUntil
skUri:skUri
managementContacts:managementContacts
youtube:youtube
itunesLink:itunesLink
firstName:firstName
middleName:middleName
lastName:lastName
musicPlayer:musicPlayer
software:software
headphones:headphones
hasMixbank:hasMixbank
completionHandler:^(SWGSuccessAndErrorSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackPlayUpdateWeb {
NSString *analyticsKey = @"sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
NSString *duration = @"sampleDuration"; // Duration of the audio play session.
NSString *maxTimecode = @"sampleMaxTimecode"; // The max timecode played during this session.
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackPlayUpdateWithCompletionBlock:analyticsKey
duration:duration
maxTimecode:maxTimecode
completionHandler:^(SWGTrackPlayUpdateResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackPlayNextWeb {
NSString *currentArtistSkId = @"sampleCurrentArtistSkId"; // Internal ID of the track
NSString *currentTrackInternalId = @"sampleCurrentTrackInternalId"; // SK ID of the artist
NSString *mode = @"sampleMode"; // Play Mode (Valid values are "artist", "genre",...
NSString *ipAddress = @"sampleIpAddress"; // IP Address of requestor
NSString *genreKey = @"sampleGenreKey"; // If you use genre as a mode, this is required
NSString *playedTracks = @"samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackPlayNextWithCompletionBlock:currentArtistSkId
currentTrackInternalId:currentTrackInternalId
mode:mode
ipAddress:ipAddress
genreKey:genreKey
playedTracks:playedTracks
completionHandler:^(SWGTrackPlayResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackPlayWeb {
NSString *artistSkId = @"sampleArtistSkId"; // SK ID of the artist
NSString *trackInternalId = @"sampleTrackInternalId"; // Internal ID of the track
NSString *ipAddress = @"sampleIpAddress"; // IP Address of requestor
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackPlayWithCompletionBlock:artistSkId
trackInternalId:trackInternalId
ipAddress:ipAddress
completionHandler:^(SWGTrackPlayResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackDeleteTrackWeb {
NSString *pk = @"samplePk"; // pk
NSString *internalId = @"sampleInternalId"; // internal_id
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *title = @"sampleTitle"; // title
NSString *artworkUrl = @"sampleArtworkUrl"; // artwork_url
NSString *waveformUrl = @"sampleWaveformUrl"; // waveform_url
NSString *tagList = @"sampleTagList"; // tag_list
NSString *kind = @"sampleKind"; // kind
NSString *genre = @"sampleGenre"; // genre
NSString *state = @"sampleState"; // state
NSString *description = @"sampleDescription"; // description
NSNumber *favoritingsCount = @-2147483648; // favoritings_count
NSNumber *playbackCount = @-2147483648; // playback_count
NSDate *uploadedOn = @"sampleUploadedOn"; // uploaded_on
NSNumber *isLiked = @NO; // is_liked
NSNumber *isReposted = @NO; // is_reposted
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackDeleteTrackWithCompletionBlock:pk
internalId:internalId
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
title:title
artworkUrl:artworkUrl
waveformUrl:waveformUrl
tagList:tagList
kind:kind
genre:genre
state:state
description:description
favoritingsCount:favoritingsCount
playbackCount:playbackCount
uploadedOn:uploadedOn
isLiked:isLiked
isReposted:isReposted
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthAccessTokenWeb {
NSString *apiSecret = @"sampleApiSecret"; // API Secret Given To Your App
NSString *apiKey = @"sampleApiKey"; // API Key Given To Your App
NSString *username = @"sampleUsername"; // Username logging in
NSString *password = @"samplePassword"; // Password logging in
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// calling api method
[webApi authAccessTokenWithCompletionBlock:apiSecret
apiKey:apiKey
username:username
password:password
completionHandler:^(SWGAuthResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthCreateUserWeb {
NSString *email = @"sampleEmail"; // email address
NSString *password = @"samplePassword"; // password
NSString *facebookId = @"sampleFacebookId"; // Facebook internal user id if this is a facebook user
NSString *planSlug = @"samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
NSString *firstName = @"sampleFirstName"; // First Name
NSString *lastName = @"sampleLastName"; // Last Name
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // URL On the web to download and assign to profile
NSString *instagram = @"sampleInstagram"; // instagram URL or slug
NSString *closestLocation = @"sampleClosestLocation"; // Users closest location with the slug of the location they...
NSString *facebook = @"sampleFacebook"; // facebook URL or slug
NSString *website = @"sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
NSString *twitter = @"sampleTwitter"; // twitter URL or slug
NSString *description = @"sampleDescription"; // Stream user profile description
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authCreateUserWithCompletionBlock:email
password:password
facebookId:facebookId
planSlug:planSlug
firstName:firstName
lastName:lastName
imageDownloadUrl:imageDownloadUrl
instagram:instagram
closestLocation:closestLocation
facebook:facebook
website:website
twitter:twitter
description:description
completionHandler:^(SWGActiveUserSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackCreateTrackWeb {
NSString *title = @"sampleTitle"; // Track Title
NSString *internalId = @"sampleInternalId"; // internal_id
NSString *description = @"sampleDescription"; // Track Description
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *duration = @"sampleDuration"; // Number of milliseconds of the track
NSString *originalContentSize = @"sampleOriginalContentSize"; // Original Content size
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *tagList = @"sampleTagList"; // tag_list
NSString *waveformUrl = @"sampleWaveformUrl"; // waveform_url
NSString *slug = @"sampleSlug"; // slug
NSString *artworkUrl = @"sampleArtworkUrl"; // artwork_url
NSNumber *playbackCount = @-2147483648; // playback_count
NSString *state = @"sampleState"; // state
NSNumber *favoritingsCount = @-2147483648; // favoritings_count
NSString *genre = @"sampleGenre"; // genre
NSString *kind = @"sampleKind"; // kind
NSDate *uploadedOn = @"sampleUploadedOn"; // uploaded_on
NSNumber *isLiked = @NO; // is_liked
NSNumber *isReposted = @NO; // is_reposted
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackCreateTrackWithCompletionBlock:title
internalId:internalId
description:description
imageDownloadUrl:imageDownloadUrl
duration:duration
originalContentSize:originalContentSize
metaTitle:metaTitle
metaDescription:metaDescription
tagList:tagList
waveformUrl:waveformUrl
slug:slug
artworkUrl:artworkUrl
playbackCount:playbackCount
state:state
favoritingsCount:favoritingsCount
genre:genre
kind:kind
uploadedOn:uploadedOn
isLiked:isLiked
isReposted:isReposted
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testNewsletterSignupCreateWeb {
NSString *email = @"sampleEmail"; // Contact Email
NSString *name = @"sampleName"; // Contact Name
NSString *listOverride = @"sampleListOverride"; // Mailchimp override
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi newsletterSignupCreateWithCompletionBlock:email
name:name
listOverride:listOverride
completionHandler:^(SWGNewsletterSignupChangeRecordSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthResetPasswordCompleteWeb {
NSString *token = @"sampleToken"; // Token
NSString *newPassword = @"sampleNewPassword"; // New Password
NSString *email = @"sampleEmail"; // Email
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authResetPasswordCompleteWithCompletionBlock:token
newPassword:newPassword
email:email
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthResetPasswordSendEmailWeb {
NSString *email = @"sampleEmail"; // User email
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authResetPasswordSendEmailWithCompletionBlock:email
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventUpdateEventWeb {
NSString *pk = @"samplePk"; // pk
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *displayName = @"sampleDisplayName"; // Event Display Name
NSDate *eventDateStart = @"sampleEventDateStart"; // event_date_start
NSDate *eventDateEnd = @"sampleEventDateEnd"; // event_date_end
NSString *eventEndTime = @"sampleEventEndTime"; // event_end_time
NSString *eventStartTime = @"sampleEventStartTime"; // event_start_time
NSString *skId = @"sampleSkId"; // sk_id
NSString *eventType = @"sampleEventType"; // event_type
NSString *ageRestriction = @"sampleAgeRestriction"; // age_restriction
NSString *seriesName = @"sampleSeriesName"; // series_name
NSString *popularity = @"samplePopularity"; // popularity
NSString *uri = @"sampleUri"; // URI of the ticket link
NSNumber *disabled = @NO; // disabled
NSString *venue = @"sampleVenue"; // venue
NSString *imageThumbnailDownloadUrl = @"sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *imageJumbotronDownloadUrl = @"sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
NSString *venueSlug = @"sampleVenueSlug"; // Slug of the venue
NSString *eventDate = @"sampleEventDate"; // US Date formatted Date
NSString *eventTime = @"sampleEventTime"; // Military time of event start
NSString *artistSlug = @"sampleArtistSlug"; // Artist creating this item
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventUpdateEventWithCompletionBlock:pk
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
displayName:displayName
eventDateStart:eventDateStart
eventDateEnd:eventDateEnd
eventEndTime:eventEndTime
eventStartTime:eventStartTime
skId:skId
eventType:eventType
ageRestriction:ageRestriction
seriesName:seriesName
popularity:popularity
uri:uri
disabled:disabled
venue:venue
imageThumbnailDownloadUrl:imageThumbnailDownloadUrl
imageJumbotronDownloadUrl:imageJumbotronDownloadUrl
venueSlug:venueSlug
eventDate:eventDate
eventTime:eventTime
artistSlug:artistSlug
completionHandler:^(SWGEventSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventDeleteEventWeb {
NSString *pk = @"samplePk"; // pk
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *displayName = @"sampleDisplayName"; // display_name
NSDate *eventDateStart = @"sampleEventDateStart"; // event_date_start
NSDate *eventDateEnd = @"sampleEventDateEnd"; // event_date_end
NSString *eventEndTime = @"sampleEventEndTime"; // event_end_time
NSString *eventStartTime = @"sampleEventStartTime"; // event_start_time
NSString *skId = @"sampleSkId"; // sk_id
NSString *eventType = @"sampleEventType"; // event_type
NSString *ageRestriction = @"sampleAgeRestriction"; // age_restriction
NSString *seriesName = @"sampleSeriesName"; // series_name
NSString *popularity = @"samplePopularity"; // popularity
NSString *uri = @"sampleUri"; // uri
NSNumber *disabled = @NO; // disabled
NSString *venue = @"sampleVenue"; // venue
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventDeleteEventWithCompletionBlock:pk
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
displayName:displayName
eventDateStart:eventDateStart
eventDateEnd:eventDateEnd
eventEndTime:eventEndTime
eventStartTime:eventStartTime
skId:skId
eventType:eventType
ageRestriction:ageRestriction
seriesName:seriesName
popularity:popularity
uri:uri
disabled:disabled
venue:venue
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthUpdateArtistUserWeb {
NSString *pk = @"samplePk"; // pk
NSString *itunesLink = @"sampleItunesLink"; // Itunes URL (Fully qualified)
NSString *youtube = @"sampleYoutube"; // youtube Slug
NSString *contactEmail = @"sampleContactEmail"; // Email business contact
NSString *djName = @"sampleDjName"; // DJ Name
NSString *paymentAddress1 = @"samplePaymentAddress1"; // Payment Address 1
NSString *paymentAddress2 = @"samplePaymentAddress2"; // Payment Address 2
NSString *paymentCity = @"samplePaymentCity"; // Payment City
NSString *paymentState = @"samplePaymentState"; // Payment State
NSString *paymentZip = @"samplePaymentZip"; // Payment Zip
NSString *country = @"sampleCountry"; // Country Code
NSString *soundcloudUsername = @"sampleSoundcloudUsername"; // Soundcloud username
NSString *paymentEin = @"samplePaymentEin"; // Payment EIN Number
NSString *email = @"sampleEmail"; // email address in which the user logs in as
NSString *password = @"samplePassword"; // password
NSString *firstName = @"sampleFirstName"; // First Name
NSString *planSlug = @"samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
NSString *slug = @"sampleSlug"; // User slug
NSString *lastName = @"sampleLastName"; // Last Name
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // URL On the web to download and assign to profile
NSString *instagram = @"sampleInstagram"; // instagram URL or slug
NSString *facebook = @"sampleFacebook"; // facebook URL or slug
NSString *website = @"sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
NSString *twitter = @"sampleTwitter"; // twitter URL or slug
NSString *description = @"sampleDescription"; // User profile description
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authUpdateArtistUserWithCompletionBlock:pk
itunesLink:itunesLink
youtube:youtube
contactEmail:contactEmail
djName:djName
paymentAddress1:paymentAddress1
paymentAddress2:paymentAddress2
paymentCity:paymentCity
paymentState:paymentState
paymentZip:paymentZip
country:country
soundcloudUsername:soundcloudUsername
paymentEin:paymentEin
email:email
password:password
firstName:firstName
planSlug:planSlug
slug:slug
lastName:lastName
imageDownloadUrl:imageDownloadUrl
instagram:instagram
facebook:facebook
website:website
twitter:twitter
description:description
completionHandler:^(SWGActiveArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthUpdateUserWeb {
NSString *pk = @"samplePk"; // pk
NSString *closestLocation = @"sampleClosestLocation"; // Update users closest location with the slug of the...
NSString *email = @"sampleEmail"; // email address in which the user logs in as
NSString *password = @"samplePassword"; // password
NSString *firstName = @"sampleFirstName"; // First Name
NSString *planSlug = @"samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
NSString *slug = @"sampleSlug"; // User slug
NSString *lastName = @"sampleLastName"; // Last Name
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // URL On the web to download and assign to profile
NSString *instagram = @"sampleInstagram"; // instagram URL or slug
NSString *facebook = @"sampleFacebook"; // facebook URL or slug
NSString *website = @"sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
NSString *twitter = @"sampleTwitter"; // twitter URL or slug
NSString *description = @"sampleDescription"; // User profile description
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authUpdateUserWithCompletionBlock:pk
closestLocation:closestLocation
email:email
password:password
firstName:firstName
planSlug:planSlug
slug:slug
lastName:lastName
imageDownloadUrl:imageDownloadUrl
instagram:instagram
facebook:facebook
website:website
twitter:twitter
description:description
completionHandler:^(SWGActiveUserSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthViewArtistUserWeb {
NSString *pk = @"samplePk"; // pk
NSString *withFavorites = @"sampleWithFavorites"; // Fetch favorites the "favorites" index.
NSString *favoritePage = @"sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
NSString *favoritePerPage = @"sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
NSString *withFollowing = @"sampleWithFollowing"; // Fetch favorites the "following" index.
NSString *followingPage = @"sampleFollowingPage"; // Paginate through more following djs by increasing by one....
NSString *followingPerPage = @"sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowingUsers = @"sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
NSString *followingUsersPage = @"sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
NSString *followingUsersPerPage = @"sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withArtistFollowers = @"sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
NSString *artistFollowersPage = @"sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
NSString *artistFollowersPerPage = @"sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authViewArtistUserWithCompletionBlock:pk
withFavorites:withFavorites
favoritePage:favoritePage
favoritePerPage:favoritePerPage
withFollowing:withFollowing
followingPage:followingPage
followingPerPage:followingPerPage
withFollowingUsers:withFollowingUsers
followingUsersPage:followingUsersPage
followingUsersPerPage:followingUsersPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withArtistFollowers:withArtistFollowers
artistFollowersPage:artistFollowersPage
artistFollowersPerPage:artistFollowersPerPage
completionHandler:^(SWGActiveArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthViewUserWeb {
NSString *pk = @"samplePk"; // pk
NSString *withFavorites = @"sampleWithFavorites"; // Fetch favorites the "favorites" index.
NSString *favoritePage = @"sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
NSString *favoritePerPage = @"sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
NSString *withFollowing = @"sampleWithFollowing"; // Fetch favorites the "following" index.
NSString *followingPage = @"sampleFollowingPage"; // Paginate through more following djs by increasing by one....
NSString *followingPerPage = @"sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowingUsers = @"sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
NSString *followingUsersPage = @"sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
NSString *followingUsersPerPage = @"sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withArtistFollowers = @"sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
NSString *artistFollowersPage = @"sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
NSString *artistFollowersPerPage = @"sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authViewUserWithCompletionBlock:pk
withFavorites:withFavorites
favoritePage:favoritePage
favoritePerPage:favoritePerPage
withFollowing:withFollowing
followingPage:followingPage
followingPerPage:followingPerPage
withFollowingUsers:withFollowingUsers
followingUsersPage:followingUsersPage
followingUsersPerPage:followingUsersPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withArtistFollowers:withArtistFollowers
artistFollowersPage:artistFollowersPage
artistFollowersPerPage:artistFollowersPerPage
completionHandler:^(SWGActiveUserSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testContactEntryCreateWeb {
NSString *name = @"sampleName"; // Contact Name
NSString *email = @"sampleEmail"; // Contact Email
NSString *comments = @"sampleComments"; // Comments
NSString *phone = @"samplePhone"; // Contact Phone
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi contactEntryCreateWithCompletionBlock:name
email:email
comments:comments
phone:phone
completionHandler:^(SWGContactEntryChangeRecordSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventCreateEventWeb {
NSString *displayName = @"sampleDisplayName"; // Event Display Name
NSString *uri = @"sampleUri"; // URI of the ticket link
NSString *imageThumbnailDownloadUrl = @"sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *imageJumbotronDownloadUrl = @"sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
NSString *venueSlug = @"sampleVenueSlug"; // Slug of the venue
NSString *eventDate = @"sampleEventDate"; // US Date formatted Date
NSString *eventTime = @"sampleEventTime"; // Military time of event start
NSString *artistSlug = @"sampleArtistSlug"; // Artist creating this item
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSDate *eventDateStart = @"sampleEventDateStart"; // event_date_start
NSDate *eventDateEnd = @"sampleEventDateEnd"; // event_date_end
NSString *eventEndTime = @"sampleEventEndTime"; // event_end_time
NSString *eventStartTime = @"sampleEventStartTime"; // event_start_time
NSString *skId = @"sampleSkId"; // sk_id
NSString *eventType = @"sampleEventType"; // event_type
NSString *seriesName = @"sampleSeriesName"; // series_name
NSString *popularity = @"samplePopularity"; // popularity
NSString *ageRestriction = @"sampleAgeRestriction"; // age_restriction
NSNumber *disabled = @NO; // disabled
NSString *venue = @"sampleVenue"; // venue
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventCreateEventWithCompletionBlock:displayName
uri:uri
imageThumbnailDownloadUrl:imageThumbnailDownloadUrl
imageJumbotronDownloadUrl:imageJumbotronDownloadUrl
venueSlug:venueSlug
eventDate:eventDate
eventTime:eventTime
artistSlug:artistSlug
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
eventDateStart:eventDateStart
eventDateEnd:eventDateEnd
eventEndTime:eventEndTime
eventStartTime:eventStartTime
skId:skId
eventType:eventType
seriesName:seriesName
popularity:popularity
ageRestriction:ageRestriction
disabled:disabled
venue:venue
completionHandler:^(SWGEventSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistsArtistSlug = @"sampleArtistsArtistSlug"; // Filter by artist slug
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
artistsArtistSlug:artistsArtistSlug
completionHandler:^(SWGEventPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testDjTierGetWeb {
NSString *page = @"samplePage"; // How many results to be returned in each category
NSString *genre = @"sampleGenre"; // Which genre key to filter on
NSString *genreId = @"sampleGenreId"; // Which genre id/pk to filter on
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi djTierGetWithCompletionBlock:page
genre:genre
genreId:genreId
completionHandler:^(SWGDjTierSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventArtistListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *displayName = @"sampleDisplayName"; // Search by display name of artist
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventArtistListWithCompletionBlock:page
perPage:perPage
ordering:ordering
displayName:displayName
completionHandler:^(SWGEventPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventArtistRetrieveWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventArtistRetrieveWithCompletionBlock:pk
completionHandler:^(SWGEventArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testCountryListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi countryListWithCompletionBlock:page
perPage:perPage
completionHandler:^(SWGCountryPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthUnfollowUserWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authUnfollowUserWithCompletionBlock:pk
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testCountryRetrieveWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi countryRetrieveWithCompletionBlock:pk
completionHandler:^(SWGCountrySerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testEventRetrieveWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventRetrieveWithCompletionBlock:pk
completionHandler:^(SWGEventSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthStatusWeb {
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authStatusWithCompletionBlock:^(SWGAuthStatusResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testGenreArtistsWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi genreArtistsWithCompletionBlock:pk
completionHandler:^(SWGGenreSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testGenreListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi genreListWithCompletionBlock:page
perPage:perPage
ordering:ordering
completionHandler:^(SWGGenrePaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testGenreRetrieveWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi genreRetrieveWithCompletionBlock:pk
completionHandler:^(SWGGenreSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testLocationListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSNumber *selectable = @NO; // Selectable are the locations that we have designated are...
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventStartDate = @"sampleEventStartDate"; // Start date range (end date range required if start is...
NSString *eventEndDate = @"sampleEventEndDate"; // End date range (start date range required if start is...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withFeaturedEvents = @"sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
NSString *withFeaturedVenues = @"sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
NSString *withVenues = @"sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
NSString *venuePage = @"sampleVenuePage"; // Paginate through more venues by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
NSString *venuesPerPage = @"sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
NSNumber *exclusiveVenues = @NO; // Boolean flag used to show which venues we have full blown...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi locationListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
selectable:selectable
withEvents:withEvents
eventStartDate:eventStartDate
eventEndDate:eventEndDate
eventPage:eventPage
withFeaturedEvents:withFeaturedEvents
withFeaturedVenues:withFeaturedVenues
withVenues:withVenues
venuePage:venuePage
eventPerPage:eventPerPage
venuesPerPage:venuesPerPage
exclusiveVenues:exclusiveVenues
completionHandler:^(SWGLocationPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testLocationRetrieveWeb {
NSString *pk = @"samplePk"; // pk
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSNumber *selectable = @NO; // Selectable are the locations that we have designated are...
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventStartDate = @"sampleEventStartDate"; // Start date range (end date range required if start is...
NSString *eventEndDate = @"sampleEventEndDate"; // End date range (start date range required if start is...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withFeaturedEvents = @"sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
NSString *withFeaturedVenues = @"sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
NSString *withVenues = @"sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
NSString *venuePage = @"sampleVenuePage"; // Paginate through more venues by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
NSString *venuesPerPage = @"sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
NSNumber *exclusiveVenues = @NO; // Boolean flag used to show which venues we have full blown...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi locationRetrieveWithCompletionBlock:pk
onlyFields:onlyFields
page:page
perPage:perPage
ordering:ordering
selectable:selectable
withEvents:withEvents
eventStartDate:eventStartDate
eventEndDate:eventEndDate
eventPage:eventPage
withFeaturedEvents:withFeaturedEvents
withFeaturedVenues:withFeaturedVenues
withVenues:withVenues
venuePage:venuePage
eventPerPage:eventPerPage
venuesPerPage:venuesPerPage
exclusiveVenues:exclusiveVenues
completionHandler:^(SWGLocationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testMusicGetWeb {
NSString *page = @"samplePage"; // How many results to be returned in each category
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi musicGetWithCompletionBlock:page
completionHandler:^(SWGMusicSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthListWeb {
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authListWithCompletionBlock:^(SWGAuthIndexResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testPostListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *authorId = @"sampleAuthorId"; // ID of author to filter
NSString *categoryTitle = @"sampleCategoryTitle"; // Category string to filter by
NSString *title = @"sampleTitle"; // Filter by blog post title
NSString *featuredPosts = @"sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
NSString *isDraft = @"sampleIsDraft"; // Filter by is_draft
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi postListWithCompletionBlock:page
perPage:perPage
ordering:ordering
authorId:authorId
categoryTitle:categoryTitle
title:title
featuredPosts:featuredPosts
isDraft:isDraft
completionHandler:^(SWGPostPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testPostRetrieveWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi postRetrieveWithCompletionBlock:pk
completionHandler:^(SWGPostSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testSearchGetWeb {
NSString *q = @"sampleQ"; // Search criteria
NSString *perPage = @"samplePerPage"; // How many results to be returned in each category
NSString *withoutEvents = @"sampleWithoutEvents"; // Skip showing the "event" index.
NSString *withoutTracks = @"sampleWithoutTracks"; // Skip showing the "track" index.
NSString *withoutArtists = @"sampleWithoutArtists"; // Skip showing the "artist" index.
NSString *withoutVenues = @"sampleWithoutVenues"; // Skip showing the "venue" index.
NSString *withoutUsers = @"sampleWithoutUsers"; // Skip showing the "users" index.
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi searchGetWithCompletionBlock:q
perPage:perPage
withoutEvents:withoutEvents
withoutTracks:withoutTracks
withoutArtists:withoutArtists
withoutVenues:withoutVenues
withoutUsers:withoutUsers
completionHandler:^(SWGSearchSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testAuthFollowUserWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authFollowUserWithCompletionBlock:pk
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistUnfollowWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistUnfollowWithCompletionBlock:pk
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackFindRelatedWeb {
NSString *pk = @"samplePk"; // pk
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *findRelated = @"sampleFindRelated"; // Find all related tracks for a given single track
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistSlug = @"sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
NSString *myFollowedDjs = @"sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
NSString *artistId = @"sampleArtistId"; // Search and filter by all tracks by a particular artist ID
NSString *artistGenresKey = @"sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
NSString *artistGenresId = @"sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
NSString *repostedBy = @"sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
NSString *listenedBy = @"sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackFindRelatedWithCompletionBlock:pk
onlyFields:onlyFields
findRelated:findRelated
page:page
perPage:perPage
ordering:ordering
artistSlug:artistSlug
myFollowedDjs:myFollowedDjs
artistId:artistId
artistGenresKey:artistGenresKey
artistGenresId:artistGenresId
repostedBy:repostedBy
listenedBy:listenedBy
completionHandler:^(SWGTrackPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackLikeWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackLikeWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *findRelated = @"sampleFindRelated"; // Find all related tracks for a given single track
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistSlug = @"sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
NSString *myFollowedDjs = @"sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
NSString *artistId = @"sampleArtistId"; // Search and filter by all tracks by a particular artist ID
NSString *artistGenresKey = @"sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
NSString *artistGenresId = @"sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
NSString *repostedBy = @"sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
NSString *listenedBy = @"sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackListWithCompletionBlock:page
onlyFields:onlyFields
findRelated:findRelated
perPage:perPage
ordering:ordering
artistSlug:artistSlug
myFollowedDjs:myFollowedDjs
artistId:artistId
artistGenresKey:artistGenresKey
artistGenresId:artistGenresId
repostedBy:repostedBy
listenedBy:listenedBy
completionHandler:^(SWGTrackPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistRetrieveWeb {
NSString *pk = @"samplePk"; // pk
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withTracks = @"sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
NSString *trackPage = @"sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *withFeaturedTracks = @"sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
NSString *featuredTrackPage = @"sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 20 events)
NSString *featuredTrackPerPage = @"sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
NSString *trackPerPage = @"sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withArtistFollowers = @"sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
NSString *artistFollowersPage = @"sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
NSString *artistFollowersPerPage = @"sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistRetrieveWithCompletionBlock:pk
withEvents:withEvents
eventPage:eventPage
withTracks:withTracks
trackPage:trackPage
withFeaturedTracks:withFeaturedTracks
featuredTrackPage:featuredTrackPage
eventPerPage:eventPerPage
featuredTrackPerPage:featuredTrackPerPage
trackPerPage:trackPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withArtistFollowers:withArtistFollowers
artistFollowersPage:artistFollowersPage
artistFollowersPerPage:artistFollowersPerPage
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *genresKey = @"sampleGenresKey"; // Filter artists by genre key
NSString *tier = @"sampleTier"; // Filter by artist tier
NSString *withEvents = @"sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withTracks = @"sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
NSString *trackPage = @"sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *withFeaturedTracks = @"sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
NSString *featuredTrackPage = @"sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 20 events)
NSString *featuredTrackPerPage = @"sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
NSString *trackPerPage = @"sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withFollowing = @"sampleWithFollowing"; // Fetch favorites the "following" index.
NSString *followingPage = @"sampleFollowingPage"; // Paginate through more following djs by increasing by one....
NSString *followingPerPage = @"sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowingUsers = @"sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
NSString *followingUsersPage = @"sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
NSString *followingUsersPerPage = @"sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
genresKey:genresKey
tier:tier
withEvents:withEvents
eventPage:eventPage
withTracks:withTracks
trackPage:trackPage
withFeaturedTracks:withFeaturedTracks
featuredTrackPage:featuredTrackPage
eventPerPage:eventPerPage
featuredTrackPerPage:featuredTrackPerPage
trackPerPage:trackPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withFollowing:withFollowing
followingPage:followingPage
followingPerPage:followingPerPage
withFollowingUsers:withFollowingUsers
followingUsersPage:followingUsersPage
followingUsersPerPage:followingUsersPerPage
completionHandler:^(SWGArtistPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistFollowWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistFollowWithCompletionBlock:pk
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackRepostWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackRepostWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackRetrieveWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackRetrieveWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackTrendingWeb {
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *findRelated = @"sampleFindRelated"; // Find all related tracks for a given single track
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistSlug = @"sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
NSString *myFollowedDjs = @"sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
NSString *artistId = @"sampleArtistId"; // Search and filter by all tracks by a particular artist ID
NSString *artistGenresKey = @"sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
NSString *artistGenresId = @"sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
NSString *repostedBy = @"sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
NSString *listenedBy = @"sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
NSString *trendingGenresKey = @"sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
NSString *trendingGenresId = @"sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackTrendingWithCompletionBlock:onlyFields
findRelated:findRelated
page:page
perPage:perPage
ordering:ordering
artistSlug:artistSlug
myFollowedDjs:myFollowedDjs
artistId:artistId
artistGenresKey:artistGenresKey
artistGenresId:artistGenresId
repostedBy:repostedBy
listenedBy:listenedBy
trendingGenresKey:trendingGenresKey
trendingGenresId:trendingGenresId
completionHandler:^(SWGTrackPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackUnlikeWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackUnlikeWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testTrackUnrepostWeb {
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackUnrepostWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testArtistClaimWeb {
NSString *pk = @"samplePk"; // pk
NSString *code = @"sampleCode"; // Soundcloud auth code which will be converted to an access...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistClaimWithCompletionBlock:pk
code:code
completionHandler:^(SWGClaimSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testVenueListWeb {
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *eventOrdering = @"sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
NSNumber *exclusive = @NO; // Boolean flag used to show which venues we have full blown...
NSString *locationSlug = @"sampleLocationSlug"; // Filter by venue location slug
NSString *withEvents = @"sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi venueListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
eventOrdering:eventOrdering
eventPerPage:eventPerPage
exclusive:exclusive
locationSlug:locationSlug
withEvents:withEvents
eventPage:eventPage
completionHandler:^(SWGVenuePaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) testVenueRetrieveWeb {
NSString *pk = @"samplePk"; // pk
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventOrdering = @"sampleEventOrdering"; // Order the event resultset by event__popularity with...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi venueRetrieveWithCompletionBlock:pk
withEvents:withEvents
eventOrdering:eventOrdering
eventPage:eventPage
eventPerPage:eventPerPage
completionHandler:^(SWGVenueSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
}
- (void) main {
// Resource: Web
NSLog(@"### calling endpoint: testArtistCreateWeb");
[self testArtistCreateWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackUpdateTrackWeb");
[self testTrackUpdateTrackWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistCreateDjWeb");
[self testArtistCreateDjWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistFinishClaimWeb");
[self testArtistFinishClaimWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackPlayUpdateWeb");
[self testTrackPlayUpdateWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackPlayNextWeb");
[self testTrackPlayNextWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackPlayWeb");
[self testTrackPlayWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackDeleteTrackWeb");
[self testTrackDeleteTrackWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthAccessTokenWeb");
[self testAuthAccessTokenWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthCreateUserWeb");
[self testAuthCreateUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackCreateTrackWeb");
[self testTrackCreateTrackWeb];
sleep(1);
NSLog(@"### calling endpoint: testNewsletterSignupCreateWeb");
[self testNewsletterSignupCreateWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthResetPasswordCompleteWeb");
[self testAuthResetPasswordCompleteWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthResetPasswordSendEmailWeb");
[self testAuthResetPasswordSendEmailWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventUpdateEventWeb");
[self testEventUpdateEventWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventDeleteEventWeb");
[self testEventDeleteEventWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthUpdateArtistUserWeb");
[self testAuthUpdateArtistUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthUpdateUserWeb");
[self testAuthUpdateUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthViewArtistUserWeb");
[self testAuthViewArtistUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthViewUserWeb");
[self testAuthViewUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testContactEntryCreateWeb");
[self testContactEntryCreateWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventCreateEventWeb");
[self testEventCreateEventWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventListWeb");
[self testEventListWeb];
sleep(1);
NSLog(@"### calling endpoint: testDjTierGetWeb");
[self testDjTierGetWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventArtistListWeb");
[self testEventArtistListWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventArtistRetrieveWeb");
[self testEventArtistRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testCountryListWeb");
[self testCountryListWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthUnfollowUserWeb");
[self testAuthUnfollowUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testCountryRetrieveWeb");
[self testCountryRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testEventRetrieveWeb");
[self testEventRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthStatusWeb");
[self testAuthStatusWeb];
sleep(1);
NSLog(@"### calling endpoint: testGenreArtistsWeb");
[self testGenreArtistsWeb];
sleep(1);
NSLog(@"### calling endpoint: testGenreListWeb");
[self testGenreListWeb];
sleep(1);
NSLog(@"### calling endpoint: testGenreRetrieveWeb");
[self testGenreRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testLocationListWeb");
[self testLocationListWeb];
sleep(1);
NSLog(@"### calling endpoint: testLocationRetrieveWeb");
[self testLocationRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testMusicGetWeb");
[self testMusicGetWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthListWeb");
[self testAuthListWeb];
sleep(1);
NSLog(@"### calling endpoint: testPostListWeb");
[self testPostListWeb];
sleep(1);
NSLog(@"### calling endpoint: testPostRetrieveWeb");
[self testPostRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testSearchGetWeb");
[self testSearchGetWeb];
sleep(1);
NSLog(@"### calling endpoint: testAuthFollowUserWeb");
[self testAuthFollowUserWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistUnfollowWeb");
[self testArtistUnfollowWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackFindRelatedWeb");
[self testTrackFindRelatedWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackLikeWeb");
[self testTrackLikeWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackListWeb");
[self testTrackListWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistRetrieveWeb");
[self testArtistRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistListWeb");
[self testArtistListWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistFollowWeb");
[self testArtistFollowWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackRepostWeb");
[self testTrackRepostWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackRetrieveWeb");
[self testTrackRetrieveWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackTrendingWeb");
[self testTrackTrendingWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackUnlikeWeb");
[self testTrackUnlikeWeb];
sleep(1);
NSLog(@"### calling endpoint: testTrackUnrepostWeb");
[self testTrackUnrepostWeb];
sleep(1);
NSLog(@"### calling endpoint: testArtistClaimWeb");
[self testArtistClaimWeb];
sleep(1);
NSLog(@"### calling endpoint: testVenueListWeb");
[self testVenueListWeb];
sleep(1);
NSLog(@"### calling endpoint: testVenueRetrieveWeb");
[self testVenueRetrieveWeb];
sleep(1);
}
@end
// In main.m
#import "SWGDjsApiTest.h"
int main (int argc, const char * argv[])
{
SWGDjsApiTest djsApiTest = [[SWGDjsApiTest alloc] init];
[djsApiTest main];
return 0;
}<?php
// this file contains testings of all functions for DjsApi
require_once 'DjsApi-php/autoload.php';
// uncomment below to set timezone ref: http://php.net/manual/en/timezones.php
//date_default_timezone_set('America/New_York');
// uncomment below to enable debugging
// DjsApi\Configuration::getDefaultConfiguration()->setDebug(TRUE);
class DjsApiTest {
function testArtistCreateWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$name = "sampleName"; // name
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$description = "sampleDescription"; // description
$origin = "sampleOrigin"; // origin
$tier = -2147483648; // tier
$yearsActive = "sampleYearsActive"; // years_active
$facebook = "sampleFacebook"; // facebook
$instagram = "sampleInstagram"; // instagram
$twitter = "sampleTwitter"; // twitter
$website = "sampleWebsite"; // website
$skId = "sampleSkId"; // sk_id
$skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
$skUri = "sampleSkUri"; // sk_uri
$managementContacts = "sampleManagementContacts"; // management_contacts
$youtube = "sampleYoutube"; // youtube
$itunesLink = "sampleItunesLink"; // itunes_link
$firstName = "sampleFirstName"; // first_name
$middleName = "sampleMiddleName"; // middle_name
$lastName = "sampleLastName"; // last_name
$musicPlayer = "sampleMusicPlayer"; // music_player
$software = "sampleSoftware"; // software
$headphones = "sampleHeadphones"; // headphones
$hasMixbank = False; // has_mixbank
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
$response = $web_api->artistCreate($name, $metaTitle, $metaDescription, $slug, $description, $origin, $tier, $yearsActive, $facebook, $instagram, $twitter, $website, $skId, $skOnTourUntil, $skUri, $managementContacts, $youtube, $itunesLink, $firstName, $middleName, $lastName, $musicPlayer, $software, $headphones, $hasMixbank);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackUpdateTrackWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$internalId = "sampleInternalId"; // internal_id
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // Slug of track
$title = "sampleTitle"; // Track Title
$artworkUrl = "sampleArtworkUrl"; // artwork_url
$waveformUrl = "sampleWaveformUrl"; // waveform_url
$tagList = "sampleTagList"; // tag_list
$kind = "sampleKind"; // kind
$genre = "sampleGenre"; // genre
$state = "sampleState"; // state
$description = "sampleDescription"; // Track Description
$favoritingsCount = -2147483648; // favoritings_count
$playbackCount = -2147483648; // playback_count
$uploadedOn = "sampleUploadedOn"; // uploaded_on
$isLiked = False; // is_liked
$isReposted = False; // is_reposted
$imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$duration = "sampleDuration"; // Number of milliseconds of the track
$originalContentSize = "sampleOriginalContentSize"; // Original Content size
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackUpdateTrack($pk, $internalId, $metaTitle, $metaDescription, $slug, $title, $artworkUrl, $waveformUrl, $tagList, $kind, $genre, $state, $description, $favoritingsCount, $playbackCount, $uploadedOn, $isLiked, $isReposted, $imageDownloadUrl, $duration, $originalContentSize);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistCreateDjWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$name = "sampleName"; // DJ Name of artist
$email = "sampleEmail"; // Email of artist
$password = "samplePassword"; // Password
$genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$description = "sampleDescription"; // description
$origin = "sampleOrigin"; // origin
$tier = -2147483648; // tier
$yearsActive = "sampleYearsActive"; // years_active
$facebook = "sampleFacebook"; // facebook
$instagram = "sampleInstagram"; // instagram
$twitter = "sampleTwitter"; // twitter
$website = "sampleWebsite"; // website
$skId = "sampleSkId"; // sk_id
$skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
$skUri = "sampleSkUri"; // sk_uri
$managementContacts = "sampleManagementContacts"; // management_contacts
$youtube = "sampleYoutube"; // youtube
$itunesLink = "sampleItunesLink"; // itunes_link
$firstName = "sampleFirstName"; // first_name
$middleName = "sampleMiddleName"; // middle_name
$lastName = "sampleLastName"; // last_name
$musicPlayer = "sampleMusicPlayer"; // music_player
$software = "sampleSoftware"; // software
$headphones = "sampleHeadphones"; // headphones
$hasMixbank = False; // has_mixbank
$soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
$soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
$code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ArtistChangeRecordSerializer">ArtistChangeRecordSerializer (model)</a>
$response = $web_api->artistCreateDj($name, $email, $password, $genreIds, $metaTitle, $metaDescription, $slug, $description, $origin, $tier, $yearsActive, $facebook, $instagram, $twitter, $website, $skId, $skOnTourUntil, $skUri, $managementContacts, $youtube, $itunesLink, $firstName, $middleName, $lastName, $musicPlayer, $software, $headphones, $hasMixbank, $soundCloudId, $soundCloudUrl, $code);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistFinishClaimWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$name = "sampleName"; // name
$email = "sampleEmail"; // New dj email
$password = "samplePassword"; // New dj password
$accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$description = "sampleDescription"; // description
$origin = "sampleOrigin"; // origin
$tier = -2147483648; // tier
$yearsActive = "sampleYearsActive"; // years_active
$facebook = "sampleFacebook"; // facebook
$instagram = "sampleInstagram"; // instagram
$twitter = "sampleTwitter"; // twitter
$website = "sampleWebsite"; // website
$skId = "sampleSkId"; // sk_id
$skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
$skUri = "sampleSkUri"; // sk_uri
$managementContacts = "sampleManagementContacts"; // management_contacts
$youtube = "sampleYoutube"; // youtube
$itunesLink = "sampleItunesLink"; // itunes_link
$firstName = "sampleFirstName"; // first_name
$middleName = "sampleMiddleName"; // middle_name
$lastName = "sampleLastName"; // last_name
$musicPlayer = "sampleMusicPlayer"; // music_player
$software = "sampleSoftware"; // software
$headphones = "sampleHeadphones"; // headphones
$hasMixbank = False; // has_mixbank
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessAndErrorSerializer">SuccessAndErrorSerializer (model)</a>
$response = $web_api->artistFinishClaim($pk, $name, $email, $password, $accessToken, $metaTitle, $metaDescription, $slug, $description, $origin, $tier, $yearsActive, $facebook, $instagram, $twitter, $website, $skId, $skOnTourUntil, $skUri, $managementContacts, $youtube, $itunesLink, $firstName, $middleName, $lastName, $musicPlayer, $software, $headphones, $hasMixbank);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackPlayUpdateWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
$duration = "sampleDuration"; // Duration of the audio play session.
$maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackPlayUpdateResponseSerializer">TrackPlayUpdateResponseSerializer (model)</a>
$response = $web_api->trackPlayUpdate($analyticsKey, $duration, $maxTimecode);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackPlayNextWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
$currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
$mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
$ipAddress = "sampleIpAddress"; // IP Address of requestor
$genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
$playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackPlayResponseSerializer">TrackPlayResponseSerializer (model)</a>
$response = $web_api->trackPlayNext($currentArtistSkId, $currentTrackInternalId, $mode, $ipAddress, $genreKey, $playedTracks);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackPlayWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$artistSkId = "sampleArtistSkId"; // SK ID of the artist
$trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
$ipAddress = "sampleIpAddress"; // IP Address of requestor
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackPlayResponseSerializer">TrackPlayResponseSerializer (model)</a>
$response = $web_api->trackPlay($artistSkId, $trackInternalId, $ipAddress);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackDeleteTrackWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$internalId = "sampleInternalId"; // internal_id
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$title = "sampleTitle"; // title
$artworkUrl = "sampleArtworkUrl"; // artwork_url
$waveformUrl = "sampleWaveformUrl"; // waveform_url
$tagList = "sampleTagList"; // tag_list
$kind = "sampleKind"; // kind
$genre = "sampleGenre"; // genre
$state = "sampleState"; // state
$description = "sampleDescription"; // description
$favoritingsCount = -2147483648; // favoritings_count
$playbackCount = -2147483648; // playback_count
$uploadedOn = "sampleUploadedOn"; // uploaded_on
$isLiked = False; // is_liked
$isReposted = False; // is_reposted
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
$response = $web_api->trackDeleteTrack($pk, $internalId, $metaTitle, $metaDescription, $slug, $title, $artworkUrl, $waveformUrl, $tagList, $kind, $genre, $state, $description, $favoritingsCount, $playbackCount, $uploadedOn, $isLiked, $isReposted);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthAccessTokenWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
$apiSecret = "sampleApiSecret"; // API Secret Given To Your App
$apiKey = "sampleApiKey"; // API Key Given To Your App
$username = "sampleUsername"; // Username logging in
$password = "samplePassword"; // Password logging in
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_AuthResponseSerializer">AuthResponseSerializer (model)</a>
$response = $web_api->authAccessToken($apiSecret, $apiKey, $username, $password);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthCreateUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$email = "sampleEmail"; // email address
$password = "samplePassword"; // password
$facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
$planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
$firstName = "sampleFirstName"; // First Name
$lastName = "sampleLastName"; // Last Name
$imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
$instagram = "sampleInstagram"; // instagram URL or slug
$closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
$facebook = "sampleFacebook"; // facebook URL or slug
$website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
$twitter = "sampleTwitter"; // twitter URL or slug
$description = "sampleDescription"; // Stream user profile description
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
$response = $web_api->authCreateUser($email, $password, $facebookId, $planSlug, $firstName, $lastName, $imageDownloadUrl, $instagram, $closestLocation, $facebook, $website, $twitter, $description);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackCreateTrackWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$title = "sampleTitle"; // Track Title
$internalId = "sampleInternalId"; // internal_id
$description = "sampleDescription"; // Track Description
$imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$duration = "sampleDuration"; // Number of milliseconds of the track
$originalContentSize = "sampleOriginalContentSize"; // Original Content size
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$tagList = "sampleTagList"; // tag_list
$waveformUrl = "sampleWaveformUrl"; // waveform_url
$slug = "sampleSlug"; // slug
$artworkUrl = "sampleArtworkUrl"; // artwork_url
$playbackCount = -2147483648; // playback_count
$state = "sampleState"; // state
$favoritingsCount = -2147483648; // favoritings_count
$genre = "sampleGenre"; // genre
$kind = "sampleKind"; // kind
$uploadedOn = "sampleUploadedOn"; // uploaded_on
$isLiked = False; // is_liked
$isReposted = False; // is_reposted
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackCreateTrack($title, $internalId, $description, $imageDownloadUrl, $duration, $originalContentSize, $metaTitle, $metaDescription, $tagList, $waveformUrl, $slug, $artworkUrl, $playbackCount, $state, $favoritingsCount, $genre, $kind, $uploadedOn, $isLiked, $isReposted);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testNewsletterSignupCreateWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$email = "sampleEmail"; // Contact Email
$name = "sampleName"; // Contact Name
$listOverride = "sampleListOverride"; // Mailchimp override
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_NewsletterSignupChangeRecordSerializer">NewsletterSignupChangeRecordSerializer (model)</a>
$response = $web_api->newsletterSignupCreate($email, $name, $listOverride);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthResetPasswordCompleteWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$token = "sampleToken"; // Token
$newPassword = "sampleNewPassword"; // New Password
$email = "sampleEmail"; // Email
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
$response = $web_api->authResetPasswordComplete($token, $newPassword, $email);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthResetPasswordSendEmailWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$email = "sampleEmail"; // User email
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
$response = $web_api->authResetPasswordSendEmail($email);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventUpdateEventWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$displayName = "sampleDisplayName"; // Event Display Name
$eventDateStart = "sampleEventDateStart"; // event_date_start
$eventDateEnd = "sampleEventDateEnd"; // event_date_end
$eventEndTime = "sampleEventEndTime"; // event_end_time
$eventStartTime = "sampleEventStartTime"; // event_start_time
$skId = "sampleSkId"; // sk_id
$eventType = "sampleEventType"; // event_type
$ageRestriction = "sampleAgeRestriction"; // age_restriction
$seriesName = "sampleSeriesName"; // series_name
$popularity = "samplePopularity"; // popularity
$uri = "sampleUri"; // URI of the ticket link
$disabled = False; // disabled
$venue = "sampleVenue"; // venue
$imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
$venueSlug = "sampleVenueSlug"; // Slug of the venue
$eventDate = "sampleEventDate"; // US Date formatted Date
$eventTime = "sampleEventTime"; // Military time of event start
$artistSlug = "sampleArtistSlug"; // Artist creating this item
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_EventSerializer">EventSerializer (model)</a>
$response = $web_api->eventUpdateEvent($pk, $metaTitle, $metaDescription, $slug, $displayName, $eventDateStart, $eventDateEnd, $eventEndTime, $eventStartTime, $skId, $eventType, $ageRestriction, $seriesName, $popularity, $uri, $disabled, $venue, $imageThumbnailDownloadUrl, $imageJumbotronDownloadUrl, $venueSlug, $eventDate, $eventTime, $artistSlug);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventDeleteEventWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$displayName = "sampleDisplayName"; // display_name
$eventDateStart = "sampleEventDateStart"; // event_date_start
$eventDateEnd = "sampleEventDateEnd"; // event_date_end
$eventEndTime = "sampleEventEndTime"; // event_end_time
$eventStartTime = "sampleEventStartTime"; // event_start_time
$skId = "sampleSkId"; // sk_id
$eventType = "sampleEventType"; // event_type
$ageRestriction = "sampleAgeRestriction"; // age_restriction
$seriesName = "sampleSeriesName"; // series_name
$popularity = "samplePopularity"; // popularity
$uri = "sampleUri"; // uri
$disabled = False; // disabled
$venue = "sampleVenue"; // venue
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
$response = $web_api->eventDeleteEvent($pk, $metaTitle, $metaDescription, $slug, $displayName, $eventDateStart, $eventDateEnd, $eventEndTime, $eventStartTime, $skId, $eventType, $ageRestriction, $seriesName, $popularity, $uri, $disabled, $venue);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthUpdateArtistUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
$youtube = "sampleYoutube"; // youtube Slug
$contactEmail = "sampleContactEmail"; // Email business contact
$djName = "sampleDjName"; // DJ Name
$paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
$paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
$paymentCity = "samplePaymentCity"; // Payment City
$paymentState = "samplePaymentState"; // Payment State
$paymentZip = "samplePaymentZip"; // Payment Zip
$country = "sampleCountry"; // Country Code
$soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
$paymentEin = "samplePaymentEin"; // Payment EIN Number
$email = "sampleEmail"; // email address in which the user logs in as
$password = "samplePassword"; // password
$firstName = "sampleFirstName"; // First Name
$planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
$slug = "sampleSlug"; // User slug
$lastName = "sampleLastName"; // Last Name
$imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
$instagram = "sampleInstagram"; // instagram URL or slug
$facebook = "sampleFacebook"; // facebook URL or slug
$website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
$twitter = "sampleTwitter"; // twitter URL or slug
$description = "sampleDescription"; // User profile description
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ActiveArtistSerializer">ActiveArtistSerializer (model)</a>
$response = $web_api->authUpdateArtistUser($pk, $itunesLink, $youtube, $contactEmail, $djName, $paymentAddress1, $paymentAddress2, $paymentCity, $paymentState, $paymentZip, $country, $soundcloudUsername, $paymentEin, $email, $password, $firstName, $planSlug, $slug, $lastName, $imageDownloadUrl, $instagram, $facebook, $website, $twitter, $description);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthUpdateUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
$email = "sampleEmail"; // email address in which the user logs in as
$password = "samplePassword"; // password
$firstName = "sampleFirstName"; // First Name
$planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
$slug = "sampleSlug"; // User slug
$lastName = "sampleLastName"; // Last Name
$imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
$instagram = "sampleInstagram"; // instagram URL or slug
$facebook = "sampleFacebook"; // facebook URL or slug
$website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
$twitter = "sampleTwitter"; // twitter URL or slug
$description = "sampleDescription"; // User profile description
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
$response = $web_api->authUpdateUser($pk, $closestLocation, $email, $password, $firstName, $planSlug, $slug, $lastName, $imageDownloadUrl, $instagram, $facebook, $website, $twitter, $description);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthViewArtistUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
$favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
$favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
$withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
$followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
$followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
$withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
$followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
$followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
$artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
$artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ActiveArtistSerializer">ActiveArtistSerializer (model)</a>
$response = $web_api->authViewArtistUser($pk, $withFavorites, $favoritePage, $favoritePerPage, $withFollowing, $followingPage, $followingPerPage, $withFollowingUsers, $followingUsersPage, $followingUsersPerPage, $withFollowers, $followersPage, $followersPerPage, $withArtistFollowers, $artistFollowersPage, $artistFollowersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthViewUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
$favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
$favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
$withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
$followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
$followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
$withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
$followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
$followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
$artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
$artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
$response = $web_api->authViewUser($pk, $withFavorites, $favoritePage, $favoritePerPage, $withFollowing, $followingPage, $followingPerPage, $withFollowingUsers, $followingUsersPage, $followingUsersPerPage, $withFollowers, $followersPage, $followersPerPage, $withArtistFollowers, $artistFollowersPage, $artistFollowersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testContactEntryCreateWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$name = "sampleName"; // Contact Name
$email = "sampleEmail"; // Contact Email
$comments = "sampleComments"; // Comments
$phone = "samplePhone"; // Contact Phone
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ContactEntryChangeRecordSerializer">ContactEntryChangeRecordSerializer (model)</a>
$response = $web_api->contactEntryCreate($name, $email, $comments, $phone);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventCreateEventWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$displayName = "sampleDisplayName"; // Event Display Name
$uri = "sampleUri"; // URI of the ticket link
$imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
$venueSlug = "sampleVenueSlug"; // Slug of the venue
$eventDate = "sampleEventDate"; // US Date formatted Date
$eventTime = "sampleEventTime"; // Military time of event start
$artistSlug = "sampleArtistSlug"; // Artist creating this item
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$eventDateStart = "sampleEventDateStart"; // event_date_start
$eventDateEnd = "sampleEventDateEnd"; // event_date_end
$eventEndTime = "sampleEventEndTime"; // event_end_time
$eventStartTime = "sampleEventStartTime"; // event_start_time
$skId = "sampleSkId"; // sk_id
$eventType = "sampleEventType"; // event_type
$seriesName = "sampleSeriesName"; // series_name
$popularity = "samplePopularity"; // popularity
$ageRestriction = "sampleAgeRestriction"; // age_restriction
$disabled = False; // disabled
$venue = "sampleVenue"; // venue
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_EventSerializer">EventSerializer (model)</a>
$response = $web_api->eventCreateEvent($displayName, $uri, $imageThumbnailDownloadUrl, $imageJumbotronDownloadUrl, $venueSlug, $eventDate, $eventTime, $artistSlug, $metaTitle, $metaDescription, $slug, $eventDateStart, $eventDateEnd, $eventEndTime, $eventStartTime, $skId, $eventType, $seriesName, $popularity, $ageRestriction, $disabled, $venue);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_EventPaginationSerializer">EventPaginationSerializer (model)</a>
$response = $web_api->eventList($page, $onlyFields, $perPage, $ordering, $artistsArtistSlug);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testDjTierGetWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // How many results to be returned in each category
$genre = "sampleGenre"; // Which genre key to filter on
$genreId = "sampleGenreId"; // Which genre id/pk to filter on
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_DjTierSerializer">DjTierSerializer (model)</a>
$response = $web_api->djTierGet($page, $genre, $genreId);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventArtistListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$displayName = "sampleDisplayName"; // Search by display name of artist
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_EventPaginationSerializer">EventPaginationSerializer (model)</a>
$response = $web_api->eventArtistList($page, $perPage, $ordering, $displayName);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventArtistRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_EventArtistSerializer">EventArtistSerializer (model)</a>
$response = $web_api->eventArtistRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testCountryListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_CountryPaginationSerializer">CountryPaginationSerializer (model)</a>
$response = $web_api->countryList($page, $perPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthUnfollowUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
$response = $web_api->authUnfollowUser($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testCountryRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_CountrySerializer">CountrySerializer (model)</a>
$response = $web_api->countryRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testEventRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_EventSerializer">EventSerializer (model)</a>
$response = $web_api->eventRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthStatusWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_AuthStatusResponseSerializer">AuthStatusResponseSerializer (model)</a>
$response = $web_api->authStatus();
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testGenreArtistsWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_GenreSerializer">GenreSerializer (model)</a>
$response = $web_api->genreArtists($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testGenreListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_GenrePaginationSerializer">GenrePaginationSerializer (model)</a>
$response = $web_api->genreList($page, $perPage, $ordering);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testGenreRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_GenreSerializer">GenreSerializer (model)</a>
$response = $web_api->genreRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testLocationListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$selectable = False; // Selectable are the locations that we have designated are...
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
$eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
$withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
$withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
$venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
$venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
$exclusiveVenues = False; // Boolean flag used to show which venues we have full blown...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_LocationPaginationSerializer">LocationPaginationSerializer (model)</a>
$response = $web_api->locationList($page, $onlyFields, $perPage, $ordering, $selectable, $withEvents, $eventStartDate, $eventEndDate, $eventPage, $withFeaturedEvents, $withFeaturedVenues, $withVenues, $venuePage, $eventPerPage, $venuesPerPage, $exclusiveVenues);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testLocationRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$selectable = False; // Selectable are the locations that we have designated are...
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
$eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
$withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
$withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
$venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
$venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
$exclusiveVenues = False; // Boolean flag used to show which venues we have full blown...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_LocationSerializer">LocationSerializer (model)</a>
$response = $web_api->locationRetrieve($pk, $onlyFields, $page, $perPage, $ordering, $selectable, $withEvents, $eventStartDate, $eventEndDate, $eventPage, $withFeaturedEvents, $withFeaturedVenues, $withVenues, $venuePage, $eventPerPage, $venuesPerPage, $exclusiveVenues);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testMusicGetWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // How many results to be returned in each category
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_MusicSerializer">MusicSerializer (model)</a>
$response = $web_api->musicGet($page);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_AuthIndexResponseSerializer">AuthIndexResponseSerializer (model)</a>
$response = $web_api->authList();
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testPostListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$authorId = "sampleAuthorId"; // ID of author to filter
$categoryTitle = "sampleCategoryTitle"; // Category string to filter by
$title = "sampleTitle"; // Filter by blog post title
$featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
$isDraft = "sampleIsDraft"; // Filter by is_draft
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_PostPaginationSerializer">PostPaginationSerializer (model)</a>
$response = $web_api->postList($page, $perPage, $ordering, $authorId, $categoryTitle, $title, $featuredPosts, $isDraft);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testPostRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_PostSerializer">PostSerializer (model)</a>
$response = $web_api->postRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testSearchGetWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$q = "sampleQ"; // Search criteria
$perPage = "samplePerPage"; // How many results to be returned in each category
$withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
$withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
$withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
$withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
$withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SearchSerializer">SearchSerializer (model)</a>
$response = $web_api->searchGet($q, $perPage, $withoutEvents, $withoutTracks, $withoutArtists, $withoutVenues, $withoutUsers);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testAuthFollowUserWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
$response = $web_api->authFollowUser($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistUnfollowWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
$response = $web_api->artistUnfollow($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackFindRelatedWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
$myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
$artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
$artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
$artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
$repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
$listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
$response = $web_api->trackFindRelated($pk, $onlyFields, $findRelated, $page, $perPage, $ordering, $artistSlug, $myFollowedDjs, $artistId, $artistGenresKey, $artistGenresId, $repostedBy, $listenedBy);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackLikeWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackLike($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
$myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
$artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
$artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
$artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
$repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
$listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
$response = $web_api->trackList($page, $onlyFields, $findRelated, $perPage, $ordering, $artistSlug, $myFollowedDjs, $artistId, $artistGenresKey, $artistGenresId, $repostedBy, $listenedBy);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
$trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
$withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
$featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
$featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
$trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
$artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
$artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
$response = $web_api->artistRetrieve($pk, $withEvents, $eventPage, $withTracks, $trackPage, $withFeaturedTracks, $featuredTrackPage, $eventPerPage, $featuredTrackPerPage, $trackPerPage, $withFollowers, $followersPage, $followersPerPage, $withArtistFollowers, $artistFollowersPage, $artistFollowersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$genresKey = "sampleGenresKey"; // Filter artists by genre key
$tier = "sampleTier"; // Filter by artist tier
$withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
$trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
$withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
$featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
$featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
$trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
$followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
$followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
$withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
$followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
$followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ArtistPaginationSerializer">ArtistPaginationSerializer (model)</a>
$response = $web_api->artistList($page, $onlyFields, $perPage, $ordering, $genresKey, $tier, $withEvents, $eventPage, $withTracks, $trackPage, $withFeaturedTracks, $featuredTrackPage, $eventPerPage, $featuredTrackPerPage, $trackPerPage, $withFollowers, $followersPage, $followersPerPage, $withFollowing, $followingPage, $followingPerPage, $withFollowingUsers, $followingUsersPage, $followingUsersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistFollowWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
$response = $web_api->artistFollow($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackRepostWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackRepost($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackTrendingWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
$myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
$artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
$artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
$artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
$repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
$listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
$trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
$trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
$response = $web_api->trackTrending($onlyFields, $findRelated, $page, $perPage, $ordering, $artistSlug, $myFollowedDjs, $artistId, $artistGenresKey, $artistGenresId, $repostedBy, $listenedBy, $trendingGenresKey, $trendingGenresId);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackUnlikeWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackUnlike($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testTrackUnrepostWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
$response = $web_api->trackUnrepost($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testArtistClaimWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_ClaimSerializer">ClaimSerializer (model)</a>
$response = $web_api->artistClaim($pk, $code);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testVenueListWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
$exclusive = False; // Boolean flag used to show which venues we have full blown...
$locationSlug = "sampleLocationSlug"; // Filter by venue location slug
$withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_VenuePaginationSerializer">VenuePaginationSerializer (model)</a>
$response = $web_api->venueList($page, $onlyFields, $perPage, $ordering, $eventOrdering, $eventPerPage, $exclusive, $locationSlug, $withEvents, $eventPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function testVenueRetrieveWeb() {
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return <a href="#model_VenueSerializer">VenueSerializer (model)</a>
$response = $web_api->venueRetrieve($pk, $withEvents, $eventOrdering, $eventPage, $eventPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
}
function runAllTests() {
/* Resource: Web */
echo 'Calling endpoint: artistCreate ... ';
$this->testArtistCreateWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackUpdateTrack ... ';
$this->testTrackUpdateTrackWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistCreateDj ... ';
$this->testArtistCreateDjWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistFinishClaim ... ';
$this->testArtistFinishClaimWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackPlayUpdate ... ';
$this->testTrackPlayUpdateWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackPlayNext ... ';
$this->testTrackPlayNextWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackPlay ... ';
$this->testTrackPlayWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackDeleteTrack ... ';
$this->testTrackDeleteTrackWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authAccessToken ... ';
$this->testAuthAccessTokenWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authCreateUser ... ';
$this->testAuthCreateUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackCreateTrack ... ';
$this->testTrackCreateTrackWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: newsletterSignupCreate ... ';
$this->testNewsletterSignupCreateWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authResetPasswordComplete ... ';
$this->testAuthResetPasswordCompleteWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authResetPasswordSendEmail ... ';
$this->testAuthResetPasswordSendEmailWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventUpdateEvent ... ';
$this->testEventUpdateEventWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventDeleteEvent ... ';
$this->testEventDeleteEventWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authUpdateArtistUser ... ';
$this->testAuthUpdateArtistUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authUpdateUser ... ';
$this->testAuthUpdateUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authViewArtistUser ... ';
$this->testAuthViewArtistUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authViewUser ... ';
$this->testAuthViewUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: contactEntryCreate ... ';
$this->testContactEntryCreateWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventCreateEvent ... ';
$this->testEventCreateEventWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventList ... ';
$this->testEventListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: djTierGet ... ';
$this->testDjTierGetWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventArtistList ... ';
$this->testEventArtistListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventArtistRetrieve ... ';
$this->testEventArtistRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: countryList ... ';
$this->testCountryListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authUnfollowUser ... ';
$this->testAuthUnfollowUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: countryRetrieve ... ';
$this->testCountryRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: eventRetrieve ... ';
$this->testEventRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authStatus ... ';
$this->testAuthStatusWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: genreArtists ... ';
$this->testGenreArtistsWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: genreList ... ';
$this->testGenreListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: genreRetrieve ... ';
$this->testGenreRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: locationList ... ';
$this->testLocationListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: locationRetrieve ... ';
$this->testLocationRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: musicGet ... ';
$this->testMusicGetWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authList ... ';
$this->testAuthListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: postList ... ';
$this->testPostListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: postRetrieve ... ';
$this->testPostRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: searchGet ... ';
$this->testSearchGetWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: authFollowUser ... ';
$this->testAuthFollowUserWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistUnfollow ... ';
$this->testArtistUnfollowWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackFindRelated ... ';
$this->testTrackFindRelatedWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackLike ... ';
$this->testTrackLikeWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackList ... ';
$this->testTrackListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistRetrieve ... ';
$this->testArtistRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistList ... ';
$this->testArtistListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistFollow ... ';
$this->testArtistFollowWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackRepost ... ';
$this->testTrackRepostWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackRetrieve ... ';
$this->testTrackRetrieveWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackTrending ... ';
$this->testTrackTrendingWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackUnlike ... ';
$this->testTrackUnlikeWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: trackUnrepost ... ';
$this->testTrackUnrepostWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: artistClaim ... ';
$this->testArtistClaimWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: venueList ... ';
$this->testVenueListWeb();
echo "\n";
sleep(1);
echo 'Calling endpoint: venueRetrieve ... ';
$this->testVenueRetrieveWeb();
echo "\n";
sleep(1);
}
}
$djsApiTest = new DjsApiTest();
$djsApiTest->runAllTests();
?># coding: utf-8
import time
import djs_api
from djs_api.rest import ApiException
from pprint import pprint
class Test(object):
def test_artist_create_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
name = "sample_name" # name
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_create(name, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False)
pprint(response)
# asynchronous call
# thread = web_api.artist_create(name, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, callback=callback_function)
except ApiException as e:
print(e)
def test_track_update_track_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_update_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, image_download_url="sample_image_download_url", duration="sample_duration", original_content_size="sample_original_content_size")
pprint(response)
# asynchronous call
# thread = web_api.track_update_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, image_download_url="sample_image_download_url", duration="sample_duration", original_content_size="sample_original_content_size", callback=callback_function)
except ApiException as e:
print(e)
def test_artist_create_dj_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
name = "sample_name" # DJ Name of artist
email = "sample_email" # Email of artist
password = "sample_password" # Password
genre_ids = "sample_genre_ids" # CSV of internal genre slugs/keys to associate with the...
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ArtistChangeRecordSerializer">ArtistChangeRecordSerializer (model)</a>
response = web_api.artist_create_dj(name, email, password, genre_ids, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, sound_cloud_id="sample_sound_cloud_id", sound_cloud_url="sample_sound_cloud_url", code="sample_code")
pprint(response)
# asynchronous call
# thread = web_api.artist_create_dj(name, email, password, genre_ids, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, sound_cloud_id="sample_sound_cloud_id", sound_cloud_url="sample_sound_cloud_url", code="sample_code", callback=callback_function)
except ApiException as e:
print(e)
def test_artist_finish_claim_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
name = "sample_name" # name
email = "sample_email" # New dj email
password = "sample_password" # New dj password
access_token = "sample_access_token" # Soundcloud access token given back to you on first claim...
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessAndErrorSerializer">SuccessAndErrorSerializer (model)</a>
response = web_api.artist_finish_claim(pk, name, email, password, access_token, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False)
pprint(response)
# asynchronous call
# thread = web_api.artist_finish_claim(pk, name, email, password, access_token, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, callback=callback_function)
except ApiException as e:
print(e)
def test_track_play_update_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
analytics_key = "sample_analytics_key" # The analytics key provided by the ``play`` API call.
duration = "sample_duration" # Duration of the audio play session.
max_timecode = "sample_max_timecode" # The max timecode played during this session.
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackPlayUpdateResponseSerializer">TrackPlayUpdateResponseSerializer (model)</a>
response = web_api.track_play_update(analytics_key, duration, max_timecode)
pprint(response)
# asynchronous call
# thread = web_api.track_play_update(analytics_key, duration, max_timecode, callback=callback_function)
except ApiException as e:
print(e)
def test_track_play_next_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
current_artist_sk_id = "sample_current_artist_sk_id" # Internal ID of the track
current_track_internal_id = "sample_current_track_internal_id" # SK ID of the artist
mode = "sample_mode" # Play Mode (Valid values are "artist", "genre",...
ip_address = "sample_ip_address" # IP Address of requestor
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackPlayResponseSerializer">TrackPlayResponseSerializer (model)</a>
response = web_api.track_play_next(current_artist_sk_id, current_track_internal_id, mode, ip_address, genre_key="sample_genre_key", played_tracks="sample_played_tracks")
pprint(response)
# asynchronous call
# thread = web_api.track_play_next(current_artist_sk_id, current_track_internal_id, mode, ip_address, genre_key="sample_genre_key", played_tracks="sample_played_tracks", callback=callback_function)
except ApiException as e:
print(e)
def test_track_play_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
artist_sk_id = "sample_artist_sk_id" # SK ID of the artist
track_internal_id = "sample_track_internal_id" # Internal ID of the track
ip_address = "sample_ip_address" # IP Address of requestor
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackPlayResponseSerializer">TrackPlayResponseSerializer (model)</a>
response = web_api.track_play(artist_sk_id, track_internal_id, ip_address)
pprint(response)
# asynchronous call
# thread = web_api.track_play(artist_sk_id, track_internal_id, ip_address, callback=callback_function)
except ApiException as e:
print(e)
def test_track_delete_track_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.track_delete_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False)
pprint(response)
# asynchronous call
# thread = web_api.track_delete_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, callback=callback_function)
except ApiException as e:
print(e)
def test_auth_access_token_web(self):
api_secret = "sample_api_secret" # API Secret Given To Your App
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_AuthResponseSerializer">AuthResponseSerializer (model)</a>
response = web_api.auth_access_token(api_secret, api_key="sample_api_key", username="sample_username", password="sample_password")
pprint(response)
# asynchronous call
# thread = web_api.auth_access_token(api_secret, api_key="sample_api_key", username="sample_username", password="sample_password", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_create_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
email = "sample_email" # email address
password = "sample_password" # password
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
response = web_api.auth_create_user(email, password, facebook_id="sample_facebook_id", plan_slug="sample_plan_slug", first_name="sample_first_name", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", closest_location="sample_closest_location", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description")
pprint(response)
# asynchronous call
# thread = web_api.auth_create_user(email, password, facebook_id="sample_facebook_id", plan_slug="sample_plan_slug", first_name="sample_first_name", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", closest_location="sample_closest_location", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description", callback=callback_function)
except ApiException as e:
print(e)
def test_track_create_track_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
title = "sample_title" # Track Title
internal_id = "sample_internal_id" # internal_id
description = "sample_description" # Track Description
image_download_url = "sample_image_download_url" # A publicly accessible URL so the file can be downloaded...
duration = "sample_duration" # Number of milliseconds of the track
original_content_size = "sample_original_content_size" # Original Content size
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_create_track(title, internal_id, description, image_download_url, duration, original_content_size, meta_title="sample_meta_title", meta_description="sample_meta_description", tag_list="sample_tag_list", waveform_url="sample_waveform_url", slug="sample_slug", artwork_url="sample_artwork_url", playback_count=-2147483648, state="sample_state", favoritings_count=-2147483648, genre="sample_genre", kind="sample_kind", uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False)
pprint(response)
# asynchronous call
# thread = web_api.track_create_track(title, internal_id, description, image_download_url, duration, original_content_size, meta_title="sample_meta_title", meta_description="sample_meta_description", tag_list="sample_tag_list", waveform_url="sample_waveform_url", slug="sample_slug", artwork_url="sample_artwork_url", playback_count=-2147483648, state="sample_state", favoritings_count=-2147483648, genre="sample_genre", kind="sample_kind", uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, callback=callback_function)
except ApiException as e:
print(e)
def test_newsletter_signup_create_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
email = "sample_email" # Contact Email
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_NewsletterSignupChangeRecordSerializer">NewsletterSignupChangeRecordSerializer (model)</a>
response = web_api.newsletter_signup_create(email, name="sample_name", list_override="sample_list_override")
pprint(response)
# asynchronous call
# thread = web_api.newsletter_signup_create(email, name="sample_name", list_override="sample_list_override", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_reset_password_complete_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
token = "sample_token" # Token
new_password = "sample_new_password" # New Password
email = "sample_email" # Email
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_reset_password_complete(token, new_password, email)
pprint(response)
# asynchronous call
# thread = web_api.auth_reset_password_complete(token, new_password, email, callback=callback_function)
except ApiException as e:
print(e)
def test_auth_reset_password_send_email_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_reset_password_send_email(email="sample_email")
pprint(response)
# asynchronous call
# thread = web_api.auth_reset_password_send_email(email="sample_email", callback=callback_function)
except ApiException as e:
print(e)
def test_event_update_event_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_EventSerializer">EventSerializer (model)</a>
response = web_api.event_update_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue", image_thumbnail_download_url="sample_image_thumbnail_download_url", image_jumbotron_download_url="sample_image_jumbotron_download_url", venue_slug="sample_venue_slug", event_date="sample_event_date", event_time="sample_event_time", artist_slug="sample_artist_slug")
pprint(response)
# asynchronous call
# thread = web_api.event_update_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue", image_thumbnail_download_url="sample_image_thumbnail_download_url", image_jumbotron_download_url="sample_image_jumbotron_download_url", venue_slug="sample_venue_slug", event_date="sample_event_date", event_time="sample_event_time", artist_slug="sample_artist_slug", callback=callback_function)
except ApiException as e:
print(e)
def test_event_delete_event_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.event_delete_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue")
pprint(response)
# asynchronous call
# thread = web_api.event_delete_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_update_artist_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ActiveArtistSerializer">ActiveArtistSerializer (model)</a>
response = web_api.auth_update_artist_user(pk, itunes_link="sample_itunes_link", youtube="sample_youtube", contact_email="sample_contact_email", dj_name="sample_dj_name", payment_address1="sample_payment_address1", payment_address2="sample_payment_address2", payment_city="sample_payment_city", payment_state="sample_payment_state", payment_zip="sample_payment_zip", country="sample_country", soundcloud_username="sample_soundcloud_username", payment_ein="sample_payment_ein", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description")
pprint(response)
# asynchronous call
# thread = web_api.auth_update_artist_user(pk, itunes_link="sample_itunes_link", youtube="sample_youtube", contact_email="sample_contact_email", dj_name="sample_dj_name", payment_address1="sample_payment_address1", payment_address2="sample_payment_address2", payment_city="sample_payment_city", payment_state="sample_payment_state", payment_zip="sample_payment_zip", country="sample_country", soundcloud_username="sample_soundcloud_username", payment_ein="sample_payment_ein", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_update_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
response = web_api.auth_update_user(pk, closest_location="sample_closest_location", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description")
pprint(response)
# asynchronous call
# thread = web_api.auth_update_user(pk, closest_location="sample_closest_location", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_view_artist_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ActiveArtistSerializer">ActiveArtistSerializer (model)</a>
response = web_api.auth_view_artist_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page")
pprint(response)
# asynchronous call
# thread = web_api.auth_view_artist_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_view_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
response = web_api.auth_view_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page")
pprint(response)
# asynchronous call
# thread = web_api.auth_view_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page", callback=callback_function)
except ApiException as e:
print(e)
def test_contact_entry_create_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
name = "sample_name" # Contact Name
email = "sample_email" # Contact Email
comments = "sample_comments" # Comments
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ContactEntryChangeRecordSerializer">ContactEntryChangeRecordSerializer (model)</a>
response = web_api.contact_entry_create(name, email, comments, phone="sample_phone")
pprint(response)
# asynchronous call
# thread = web_api.contact_entry_create(name, email, comments, phone="sample_phone", callback=callback_function)
except ApiException as e:
print(e)
def test_event_create_event_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
display_name = "sample_display_name" # Event Display Name
uri = "sample_uri" # URI of the ticket link
image_thumbnail_download_url = "sample_image_thumbnail_download_url" # A publicly accessible URL so the file can be downloaded...
image_jumbotron_download_url = "sample_image_jumbotron_download_url" # A publicly accessible Jumbotron URL so the file can be...
venue_slug = "sample_venue_slug" # Slug of the venue
event_date = "sample_event_date" # US Date formatted Date
event_time = "sample_event_time" # Military time of event start
artist_slug = "sample_artist_slug" # Artist creating this item
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_EventSerializer">EventSerializer (model)</a>
response = web_api.event_create_event(display_name, uri, image_thumbnail_download_url, image_jumbotron_download_url, venue_slug, event_date, event_time, artist_slug, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", series_name="sample_series_name", popularity="sample_popularity", age_restriction="sample_age_restriction", disabled=False, venue="sample_venue")
pprint(response)
# asynchronous call
# thread = web_api.event_create_event(display_name, uri, image_thumbnail_download_url, image_jumbotron_download_url, venue_slug, event_date, event_time, artist_slug, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", series_name="sample_series_name", popularity="sample_popularity", age_restriction="sample_age_restriction", disabled=False, venue="sample_venue", callback=callback_function)
except ApiException as e:
print(e)
def test_event_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_EventPaginationSerializer">EventPaginationSerializer (model)</a>
response = web_api.event_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", artists__artist__slug="sample_artists__artist__slug")
pprint(response)
# asynchronous call
# thread = web_api.event_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", artists__artist__slug="sample_artists__artist__slug", callback=callback_function)
except ApiException as e:
print(e)
def test_dj_tier_get_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_DjTierSerializer">DjTierSerializer (model)</a>
response = web_api.dj_tier_get(page="sample_page", genre="sample_genre", genre_id="sample_genre_id")
pprint(response)
# asynchronous call
# thread = web_api.dj_tier_get(page="sample_page", genre="sample_genre", genre_id="sample_genre_id", callback=callback_function)
except ApiException as e:
print(e)
def test_event_artist_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_EventPaginationSerializer">EventPaginationSerializer (model)</a>
response = web_api.event_artist_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", display_name="sample_display_name")
pprint(response)
# asynchronous call
# thread = web_api.event_artist_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", display_name="sample_display_name", callback=callback_function)
except ApiException as e:
print(e)
def test_event_artist_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_EventArtistSerializer">EventArtistSerializer (model)</a>
response = web_api.event_artist_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.event_artist_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_country_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_CountryPaginationSerializer">CountryPaginationSerializer (model)</a>
response = web_api.country_list(page="sample_page", per_page="sample_per_page")
pprint(response)
# asynchronous call
# thread = web_api.country_list(page="sample_page", per_page="sample_per_page", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_unfollow_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_unfollow_user(pk)
pprint(response)
# asynchronous call
# thread = web_api.auth_unfollow_user(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_country_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_CountrySerializer">CountrySerializer (model)</a>
response = web_api.country_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.country_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_event_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_EventSerializer">EventSerializer (model)</a>
response = web_api.event_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.event_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_auth_status_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_AuthStatusResponseSerializer">AuthStatusResponseSerializer (model)</a>
response = web_api.auth_status()
pprint(response)
# asynchronous call
# thread = web_api.auth_status(, callback=callback_function)
except ApiException as e:
print(e)
def test_genre_artists_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_GenreSerializer">GenreSerializer (model)</a>
response = web_api.genre_artists(pk)
pprint(response)
# asynchronous call
# thread = web_api.genre_artists(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_genre_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_GenrePaginationSerializer">GenrePaginationSerializer (model)</a>
response = web_api.genre_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering")
pprint(response)
# asynchronous call
# thread = web_api.genre_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", callback=callback_function)
except ApiException as e:
print(e)
def test_genre_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_GenreSerializer">GenreSerializer (model)</a>
response = web_api.genre_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.genre_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_location_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_LocationPaginationSerializer">LocationPaginationSerializer (model)</a>
response = web_api.location_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False)
pprint(response)
# asynchronous call
# thread = web_api.location_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False, callback=callback_function)
except ApiException as e:
print(e)
def test_location_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_LocationSerializer">LocationSerializer (model)</a>
response = web_api.location_retrieve(pk, only_fields="sample_only_fields", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False)
pprint(response)
# asynchronous call
# thread = web_api.location_retrieve(pk, only_fields="sample_only_fields", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False, callback=callback_function)
except ApiException as e:
print(e)
def test_music_get_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_MusicSerializer">MusicSerializer (model)</a>
response = web_api.music_get(page="sample_page")
pprint(response)
# asynchronous call
# thread = web_api.music_get(page="sample_page", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_AuthIndexResponseSerializer">AuthIndexResponseSerializer (model)</a>
response = web_api.auth_list()
pprint(response)
# asynchronous call
# thread = web_api.auth_list(, callback=callback_function)
except ApiException as e:
print(e)
def test_post_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_PostPaginationSerializer">PostPaginationSerializer (model)</a>
response = web_api.post_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", author__id="sample_author__id", category__title="sample_category__title", title="sample_title", featured_posts="sample_featured_posts", is_draft="sample_is_draft")
pprint(response)
# asynchronous call
# thread = web_api.post_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", author__id="sample_author__id", category__title="sample_category__title", title="sample_title", featured_posts="sample_featured_posts", is_draft="sample_is_draft", callback=callback_function)
except ApiException as e:
print(e)
def test_post_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_PostSerializer">PostSerializer (model)</a>
response = web_api.post_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.post_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_search_get_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
q = "sample_q" # Search criteria
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SearchSerializer">SearchSerializer (model)</a>
response = web_api.search_get(q, per_page="sample_per_page", without_events="sample_without_events", without_tracks="sample_without_tracks", without_artists="sample_without_artists", without_venues="sample_without_venues", without_users="sample_without_users")
pprint(response)
# asynchronous call
# thread = web_api.search_get(q, per_page="sample_per_page", without_events="sample_without_events", without_tracks="sample_without_tracks", without_artists="sample_without_artists", without_venues="sample_without_venues", without_users="sample_without_users", callback=callback_function)
except ApiException as e:
print(e)
def test_auth_follow_user_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_follow_user(pk)
pprint(response)
# asynchronous call
# thread = web_api.auth_follow_user(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_artist_unfollow_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_unfollow(pk)
pprint(response)
# asynchronous call
# thread = web_api.artist_unfollow(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_track_find_related_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
response = web_api.track_find_related(pk, only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by")
pprint(response)
# asynchronous call
# thread = web_api.track_find_related(pk, only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", callback=callback_function)
except ApiException as e:
print(e)
def test_track_like_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_like(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_like(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_track_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
response = web_api.track_list(page="sample_page", only_fields="sample_only_fields", find_related="sample_find_related", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by")
pprint(response)
# asynchronous call
# thread = web_api.track_list(page="sample_page", only_fields="sample_only_fields", find_related="sample_find_related", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", callback=callback_function)
except ApiException as e:
print(e)
def test_artist_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_retrieve(pk, with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page")
pprint(response)
# asynchronous call
# thread = web_api.artist_retrieve(pk, with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page", callback=callback_function)
except ApiException as e:
print(e)
def test_artist_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ArtistPaginationSerializer">ArtistPaginationSerializer (model)</a>
response = web_api.artist_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", genres__key="sample_genres__key", tier="sample_tier", with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page")
pprint(response)
# asynchronous call
# thread = web_api.artist_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", genres__key="sample_genres__key", tier="sample_tier", with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", callback=callback_function)
except ApiException as e:
print(e)
def test_artist_follow_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_follow(pk)
pprint(response)
# asynchronous call
# thread = web_api.artist_follow(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_track_repost_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_repost(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_repost(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_track_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_track_trending_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
response = web_api.track_trending(only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", trending__genres__key="sample_trending__genres__key", trending__genres__id="sample_trending__genres__id")
pprint(response)
# asynchronous call
# thread = web_api.track_trending(only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", trending__genres__key="sample_trending__genres__key", trending__genres__id="sample_trending__genres__id", callback=callback_function)
except ApiException as e:
print(e)
def test_track_unlike_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_unlike(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_unlike(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_track_unrepost_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_unrepost(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_unrepost(pk, callback=callback_function)
except ApiException as e:
print(e)
def test_artist_claim_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
code = "sample_code" # Soundcloud auth code which will be converted to an access...
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_ClaimSerializer">ClaimSerializer (model)</a>
response = web_api.artist_claim(pk, code)
pprint(response)
# asynchronous call
# thread = web_api.artist_claim(pk, code, callback=callback_function)
except ApiException as e:
print(e)
def test_venue_list_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_VenuePaginationSerializer">VenuePaginationSerializer (model)</a>
response = web_api.venue_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", event_ordering="sample_event_ordering", event_per_page="sample_event_per_page", exclusive=False, location__slug="sample_location__slug", with_events="sample_with_events", event_page="sample_event_page")
pprint(response)
# asynchronous call
# thread = web_api.venue_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", event_ordering="sample_event_ordering", event_per_page="sample_event_per_page", exclusive=False, location__slug="sample_location__slug", with_events="sample_with_events", event_page="sample_event_page", callback=callback_function)
except ApiException as e:
print(e)
def test_venue_retrieve_web(self):
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return <a href="#model_VenueSerializer">VenueSerializer (model)</a>
response = web_api.venue_retrieve(pk, with_events="sample_with_events", event_ordering="sample_event_ordering", event_page="sample_event_page", event_per_page="sample_event_per_page")
pprint(response)
# asynchronous call
# thread = web_api.venue_retrieve(pk, with_events="sample_with_events", event_ordering="sample_event_ordering", event_page="sample_event_page", event_per_page="sample_event_per_page", callback=callback_function)
except ApiException as e:
print(e)
def main(self):
# Resource: Web
print("### Calling endpoint: test_artist_create_web")
self.test_artist_create_web()
time.sleep(1)
print("### Calling endpoint: test_track_update_track_web")
self.test_track_update_track_web()
time.sleep(1)
print("### Calling endpoint: test_artist_create_dj_web")
self.test_artist_create_dj_web()
time.sleep(1)
print("### Calling endpoint: test_artist_finish_claim_web")
self.test_artist_finish_claim_web()
time.sleep(1)
print("### Calling endpoint: test_track_play_update_web")
self.test_track_play_update_web()
time.sleep(1)
print("### Calling endpoint: test_track_play_next_web")
self.test_track_play_next_web()
time.sleep(1)
print("### Calling endpoint: test_track_play_web")
self.test_track_play_web()
time.sleep(1)
print("### Calling endpoint: test_track_delete_track_web")
self.test_track_delete_track_web()
time.sleep(1)
print("### Calling endpoint: test_auth_access_token_web")
self.test_auth_access_token_web()
time.sleep(1)
print("### Calling endpoint: test_auth_create_user_web")
self.test_auth_create_user_web()
time.sleep(1)
print("### Calling endpoint: test_track_create_track_web")
self.test_track_create_track_web()
time.sleep(1)
print("### Calling endpoint: test_newsletter_signup_create_web")
self.test_newsletter_signup_create_web()
time.sleep(1)
print("### Calling endpoint: test_auth_reset_password_complete_web")
self.test_auth_reset_password_complete_web()
time.sleep(1)
print("### Calling endpoint: test_auth_reset_password_send_email_web")
self.test_auth_reset_password_send_email_web()
time.sleep(1)
print("### Calling endpoint: test_event_update_event_web")
self.test_event_update_event_web()
time.sleep(1)
print("### Calling endpoint: test_event_delete_event_web")
self.test_event_delete_event_web()
time.sleep(1)
print("### Calling endpoint: test_auth_update_artist_user_web")
self.test_auth_update_artist_user_web()
time.sleep(1)
print("### Calling endpoint: test_auth_update_user_web")
self.test_auth_update_user_web()
time.sleep(1)
print("### Calling endpoint: test_auth_view_artist_user_web")
self.test_auth_view_artist_user_web()
time.sleep(1)
print("### Calling endpoint: test_auth_view_user_web")
self.test_auth_view_user_web()
time.sleep(1)
print("### Calling endpoint: test_contact_entry_create_web")
self.test_contact_entry_create_web()
time.sleep(1)
print("### Calling endpoint: test_event_create_event_web")
self.test_event_create_event_web()
time.sleep(1)
print("### Calling endpoint: test_event_list_web")
self.test_event_list_web()
time.sleep(1)
print("### Calling endpoint: test_dj_tier_get_web")
self.test_dj_tier_get_web()
time.sleep(1)
print("### Calling endpoint: test_event_artist_list_web")
self.test_event_artist_list_web()
time.sleep(1)
print("### Calling endpoint: test_event_artist_retrieve_web")
self.test_event_artist_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_country_list_web")
self.test_country_list_web()
time.sleep(1)
print("### Calling endpoint: test_auth_unfollow_user_web")
self.test_auth_unfollow_user_web()
time.sleep(1)
print("### Calling endpoint: test_country_retrieve_web")
self.test_country_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_event_retrieve_web")
self.test_event_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_auth_status_web")
self.test_auth_status_web()
time.sleep(1)
print("### Calling endpoint: test_genre_artists_web")
self.test_genre_artists_web()
time.sleep(1)
print("### Calling endpoint: test_genre_list_web")
self.test_genre_list_web()
time.sleep(1)
print("### Calling endpoint: test_genre_retrieve_web")
self.test_genre_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_location_list_web")
self.test_location_list_web()
time.sleep(1)
print("### Calling endpoint: test_location_retrieve_web")
self.test_location_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_music_get_web")
self.test_music_get_web()
time.sleep(1)
print("### Calling endpoint: test_auth_list_web")
self.test_auth_list_web()
time.sleep(1)
print("### Calling endpoint: test_post_list_web")
self.test_post_list_web()
time.sleep(1)
print("### Calling endpoint: test_post_retrieve_web")
self.test_post_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_search_get_web")
self.test_search_get_web()
time.sleep(1)
print("### Calling endpoint: test_auth_follow_user_web")
self.test_auth_follow_user_web()
time.sleep(1)
print("### Calling endpoint: test_artist_unfollow_web")
self.test_artist_unfollow_web()
time.sleep(1)
print("### Calling endpoint: test_track_find_related_web")
self.test_track_find_related_web()
time.sleep(1)
print("### Calling endpoint: test_track_like_web")
self.test_track_like_web()
time.sleep(1)
print("### Calling endpoint: test_track_list_web")
self.test_track_list_web()
time.sleep(1)
print("### Calling endpoint: test_artist_retrieve_web")
self.test_artist_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_artist_list_web")
self.test_artist_list_web()
time.sleep(1)
print("### Calling endpoint: test_artist_follow_web")
self.test_artist_follow_web()
time.sleep(1)
print("### Calling endpoint: test_track_repost_web")
self.test_track_repost_web()
time.sleep(1)
print("### Calling endpoint: test_track_retrieve_web")
self.test_track_retrieve_web()
time.sleep(1)
print("### Calling endpoint: test_track_trending_web")
self.test_track_trending_web()
time.sleep(1)
print("### Calling endpoint: test_track_unlike_web")
self.test_track_unlike_web()
time.sleep(1)
print("### Calling endpoint: test_track_unrepost_web")
self.test_track_unrepost_web()
time.sleep(1)
print("### Calling endpoint: test_artist_claim_web")
self.test_artist_claim_web()
time.sleep(1)
print("### Calling endpoint: test_venue_list_web")
self.test_venue_list_web()
time.sleep(1)
print("### Calling endpoint: test_venue_retrieve_web")
self.test_venue_retrieve_web()
time.sleep(1)
if __name__ == "__main__":
Test().main()# File: djs_api_test.rb
require 'djs_api'
DjsApi.configure do |config|
config.scheme = 'http'
config.host = 'devcms.djs.com'
config.base_path = ''
config.inject_format = false
end
class DjsApiTest
def test_artist_create_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
name = "sample_name" # name
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_create(name, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :description => "sample_description", :origin => "sample_origin", :tier => -2147483648, :years_active => "sample_years_active", :facebook => "sample_facebook", :instagram => "sample_instagram", :twitter => "sample_twitter", :website => "sample_website", :sk_id => "sample_sk_id", :sk_on_tour_until => "sample_sk_on_tour_until", :sk_uri => "sample_sk_uri", :management_contacts => "sample_management_contacts", :youtube => "sample_youtube", :itunes_link => "sample_itunes_link", :first_name => "sample_first_name", :middle_name => "sample_middle_name", :last_name => "sample_last_name", :music_player => "sample_music_player", :software => "sample_software", :headphones => "sample_headphones", :has_mixbank => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_update_track_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_update_track(pk, internal_id, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :title => "sample_title", :artwork_url => "sample_artwork_url", :waveform_url => "sample_waveform_url", :tag_list => "sample_tag_list", :kind => "sample_kind", :genre => "sample_genre", :state => "sample_state", :description => "sample_description", :favoritings_count => -2147483648, :playback_count => -2147483648, :uploaded_on => "2014-12-31", :is_liked => false, :is_reposted => false, :image_download_url => "sample_image_download_url", :duration => "sample_duration", :original_content_size => "sample_original_content_size")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_create_dj_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
name = "sample_name" # DJ Name of artist
email = "sample_email" # Email of artist
password = "sample_password" # Password
genre_ids = "sample_genre_ids" # CSV of internal genre slugs/keys to associate with the...
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ArtistChangeRecordSerializer">ArtistChangeRecordSerializer (model)</a>
response = web_api.artist_create_dj(name, email, password, genre_ids, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :description => "sample_description", :origin => "sample_origin", :tier => -2147483648, :years_active => "sample_years_active", :facebook => "sample_facebook", :instagram => "sample_instagram", :twitter => "sample_twitter", :website => "sample_website", :sk_id => "sample_sk_id", :sk_on_tour_until => "sample_sk_on_tour_until", :sk_uri => "sample_sk_uri", :management_contacts => "sample_management_contacts", :youtube => "sample_youtube", :itunes_link => "sample_itunes_link", :first_name => "sample_first_name", :middle_name => "sample_middle_name", :last_name => "sample_last_name", :music_player => "sample_music_player", :software => "sample_software", :headphones => "sample_headphones", :has_mixbank => false, :sound_cloud_id => "sample_sound_cloud_id", :sound_cloud_url => "sample_sound_cloud_url", :code => "sample_code")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_finish_claim_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
name = "sample_name" # name
email = "sample_email" # New dj email
password = "sample_password" # New dj password
access_token = "sample_access_token" # Soundcloud access token given back to you on first claim...
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessAndErrorSerializer">SuccessAndErrorSerializer (model)</a>
response = web_api.artist_finish_claim(pk, name, email, password, access_token, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :description => "sample_description", :origin => "sample_origin", :tier => -2147483648, :years_active => "sample_years_active", :facebook => "sample_facebook", :instagram => "sample_instagram", :twitter => "sample_twitter", :website => "sample_website", :sk_id => "sample_sk_id", :sk_on_tour_until => "sample_sk_on_tour_until", :sk_uri => "sample_sk_uri", :management_contacts => "sample_management_contacts", :youtube => "sample_youtube", :itunes_link => "sample_itunes_link", :first_name => "sample_first_name", :middle_name => "sample_middle_name", :last_name => "sample_last_name", :music_player => "sample_music_player", :software => "sample_software", :headphones => "sample_headphones", :has_mixbank => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_play_update_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
analytics_key = "sample_analytics_key" # The analytics key provided by the ``play`` API call.
duration = "sample_duration" # Duration of the audio play session.
max_timecode = "sample_max_timecode" # The max timecode played during this session.
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackPlayUpdateResponseSerializer">TrackPlayUpdateResponseSerializer (model)</a>
response = web_api.track_play_update(analytics_key, duration, max_timecode)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_play_next_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
current_artist_sk_id = "sample_current_artist_sk_id" # Internal ID of the track
current_track_internal_id = "sample_current_track_internal_id" # SK ID of the artist
mode = "sample_mode" # Play Mode (Valid values are "artist", "genre",...
ip_address = "sample_ip_address" # IP Address of requestor
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackPlayResponseSerializer">TrackPlayResponseSerializer (model)</a>
response = web_api.track_play_next(current_artist_sk_id, current_track_internal_id, mode, ip_address, :genre_key => "sample_genre_key", :played_tracks => "sample_played_tracks")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_play_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
artist_sk_id = "sample_artist_sk_id" # SK ID of the artist
track_internal_id = "sample_track_internal_id" # Internal ID of the track
ip_address = "sample_ip_address" # IP Address of requestor
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackPlayResponseSerializer">TrackPlayResponseSerializer (model)</a>
response = web_api.track_play(artist_sk_id, track_internal_id, ip_address)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_delete_track_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.track_delete_track(pk, internal_id, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :title => "sample_title", :artwork_url => "sample_artwork_url", :waveform_url => "sample_waveform_url", :tag_list => "sample_tag_list", :kind => "sample_kind", :genre => "sample_genre", :state => "sample_state", :description => "sample_description", :favoritings_count => -2147483648, :playback_count => -2147483648, :uploaded_on => "2014-12-31", :is_liked => false, :is_reposted => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_access_token_web
api_secret = "sample_api_secret" # API Secret Given To Your App
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_AuthResponseSerializer">AuthResponseSerializer (model)</a>
response = web_api.auth_access_token(api_secret, :api_key => "sample_api_key", :username => "sample_username", :password => "sample_password")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_create_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
email = "sample_email" # email address
password = "sample_password" # password
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
response = web_api.auth_create_user(email, password, :facebook_id => "sample_facebook_id", :plan_slug => "sample_plan_slug", :first_name => "sample_first_name", :last_name => "sample_last_name", :image_download_url => "sample_image_download_url", :instagram => "sample_instagram", :closest_location => "sample_closest_location", :facebook => "sample_facebook", :website => "sample_website", :twitter => "sample_twitter", :description => "sample_description")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_create_track_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
title = "sample_title" # Track Title
internal_id = "sample_internal_id" # internal_id
description = "sample_description" # Track Description
image_download_url = "sample_image_download_url" # A publicly accessible URL so the file can be downloaded...
duration = "sample_duration" # Number of milliseconds of the track
original_content_size = "sample_original_content_size" # Original Content size
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_create_track(title, internal_id, description, image_download_url, duration, original_content_size, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :tag_list => "sample_tag_list", :waveform_url => "sample_waveform_url", :slug => "sample_slug", :artwork_url => "sample_artwork_url", :playback_count => -2147483648, :state => "sample_state", :favoritings_count => -2147483648, :genre => "sample_genre", :kind => "sample_kind", :uploaded_on => "2014-12-31", :is_liked => false, :is_reposted => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_newsletter_signup_create_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
email = "sample_email" # Contact Email
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_NewsletterSignupChangeRecordSerializer">NewsletterSignupChangeRecordSerializer (model)</a>
response = web_api.newsletter_signup_create(email, :name => "sample_name", :list_override => "sample_list_override")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_reset_password_complete_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
token = "sample_token" # Token
new_password = "sample_new_password" # New Password
email = "sample_email" # Email
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_reset_password_complete(token, new_password, email)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_reset_password_send_email_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_reset_password_send_email(:email => "sample_email")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_update_event_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_EventSerializer">EventSerializer (model)</a>
response = web_api.event_update_event(pk, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :display_name => "sample_display_name", :event_date_start => "2014-12-31", :event_date_end => "2014-12-31", :event_end_time => "sample_event_end_time", :event_start_time => "sample_event_start_time", :sk_id => "sample_sk_id", :event_type => "sample_event_type", :age_restriction => "sample_age_restriction", :series_name => "sample_series_name", :popularity => "sample_popularity", :uri => "sample_uri", :disabled => false, :venue => "sample_venue", :image_thumbnail_download_url => "sample_image_thumbnail_download_url", :image_jumbotron_download_url => "sample_image_jumbotron_download_url", :venue_slug => "sample_venue_slug", :event_date => "sample_event_date", :event_time => "sample_event_time", :artist_slug => "sample_artist_slug")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_delete_event_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.event_delete_event(pk, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :display_name => "sample_display_name", :event_date_start => "2014-12-31", :event_date_end => "2014-12-31", :event_end_time => "sample_event_end_time", :event_start_time => "sample_event_start_time", :sk_id => "sample_sk_id", :event_type => "sample_event_type", :age_restriction => "sample_age_restriction", :series_name => "sample_series_name", :popularity => "sample_popularity", :uri => "sample_uri", :disabled => false, :venue => "sample_venue")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_update_artist_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ActiveArtistSerializer">ActiveArtistSerializer (model)</a>
response = web_api.auth_update_artist_user(pk, :itunes_link => "sample_itunes_link", :youtube => "sample_youtube", :contact_email => "sample_contact_email", :dj_name => "sample_dj_name", :payment_address1 => "sample_payment_address1", :payment_address2 => "sample_payment_address2", :payment_city => "sample_payment_city", :payment_state => "sample_payment_state", :payment_zip => "sample_payment_zip", :country => "sample_country", :soundcloud_username => "sample_soundcloud_username", :payment_ein => "sample_payment_ein", :email => "sample_email", :password => "sample_password", :first_name => "sample_first_name", :plan_slug => "sample_plan_slug", :slug => "sample_slug", :last_name => "sample_last_name", :image_download_url => "sample_image_download_url", :instagram => "sample_instagram", :facebook => "sample_facebook", :website => "sample_website", :twitter => "sample_twitter", :description => "sample_description")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_update_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
response = web_api.auth_update_user(pk, :closest_location => "sample_closest_location", :email => "sample_email", :password => "sample_password", :first_name => "sample_first_name", :plan_slug => "sample_plan_slug", :slug => "sample_slug", :last_name => "sample_last_name", :image_download_url => "sample_image_download_url", :instagram => "sample_instagram", :facebook => "sample_facebook", :website => "sample_website", :twitter => "sample_twitter", :description => "sample_description")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_view_artist_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ActiveArtistSerializer">ActiveArtistSerializer (model)</a>
response = web_api.auth_view_artist_user(pk, :with_favorites => "sample_with_favorites", :favorite_page => "sample_favorite_page", :favorite_per_page => "sample_favorite_per_page", :with_following => "sample_with_following", :following_page => "sample_following_page", :following_per_page => "sample_following_per_page", :with_following_users => "sample_with_following_users", :following_users_page => "sample_following_users_page", :following_users_per_page => "sample_following_users_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_artist_followers => "sample_with_artist_followers", :artist_followers_page => "sample_artist_followers_page", :artist_followers_per_page => "sample_artist_followers_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_view_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ActiveUserSerializer">ActiveUserSerializer (model)</a>
response = web_api.auth_view_user(pk, :with_favorites => "sample_with_favorites", :favorite_page => "sample_favorite_page", :favorite_per_page => "sample_favorite_per_page", :with_following => "sample_with_following", :following_page => "sample_following_page", :following_per_page => "sample_following_per_page", :with_following_users => "sample_with_following_users", :following_users_page => "sample_following_users_page", :following_users_per_page => "sample_following_users_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_artist_followers => "sample_with_artist_followers", :artist_followers_page => "sample_artist_followers_page", :artist_followers_per_page => "sample_artist_followers_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_contact_entry_create_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
name = "sample_name" # Contact Name
email = "sample_email" # Contact Email
comments = "sample_comments" # Comments
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ContactEntryChangeRecordSerializer">ContactEntryChangeRecordSerializer (model)</a>
response = web_api.contact_entry_create(name, email, comments, :phone => "sample_phone")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_create_event_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
display_name = "sample_display_name" # Event Display Name
uri = "sample_uri" # URI of the ticket link
image_thumbnail_download_url = "sample_image_thumbnail_download_url" # A publicly accessible URL so the file can be downloaded...
image_jumbotron_download_url = "sample_image_jumbotron_download_url" # A publicly accessible Jumbotron URL so the file can be...
venue_slug = "sample_venue_slug" # Slug of the venue
event_date = "sample_event_date" # US Date formatted Date
event_time = "sample_event_time" # Military time of event start
artist_slug = "sample_artist_slug" # Artist creating this item
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_EventSerializer">EventSerializer (model)</a>
response = web_api.event_create_event(display_name, uri, image_thumbnail_download_url, image_jumbotron_download_url, venue_slug, event_date, event_time, artist_slug, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :event_date_start => "2014-12-31", :event_date_end => "2014-12-31", :event_end_time => "sample_event_end_time", :event_start_time => "sample_event_start_time", :sk_id => "sample_sk_id", :event_type => "sample_event_type", :series_name => "sample_series_name", :popularity => "sample_popularity", :age_restriction => "sample_age_restriction", :disabled => false, :venue => "sample_venue")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_EventPaginationSerializer">EventPaginationSerializer (model)</a>
response = web_api.event_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :artists__artist__slug => "sample_artists__artist__slug")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_dj_tier_get_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_DjTierSerializer">DjTierSerializer (model)</a>
response = web_api.dj_tier_get(:page => "sample_page", :genre => "sample_genre", :genre_id => "sample_genre_id")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_artist_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_EventPaginationSerializer">EventPaginationSerializer (model)</a>
response = web_api.event_artist_list(:page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :display_name => "sample_display_name")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_artist_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_EventArtistSerializer">EventArtistSerializer (model)</a>
response = web_api.event_artist_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_country_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_CountryPaginationSerializer">CountryPaginationSerializer (model)</a>
response = web_api.country_list(:page => "sample_page", :per_page => "sample_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_unfollow_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_unfollow_user(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_country_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_CountrySerializer">CountrySerializer (model)</a>
response = web_api.country_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_event_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_EventSerializer">EventSerializer (model)</a>
response = web_api.event_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_status_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_AuthStatusResponseSerializer">AuthStatusResponseSerializer (model)</a>
response = web_api.auth_status()
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_genre_artists_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_GenreSerializer">GenreSerializer (model)</a>
response = web_api.genre_artists(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_genre_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_GenrePaginationSerializer">GenrePaginationSerializer (model)</a>
response = web_api.genre_list(:page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_genre_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_GenreSerializer">GenreSerializer (model)</a>
response = web_api.genre_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_location_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_LocationPaginationSerializer">LocationPaginationSerializer (model)</a>
response = web_api.location_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :selectable => false, :with_events => "sample_with_events", :event_start_date => "sample_event_start_date", :event_end_date => "sample_event_end_date", :event_page => "sample_event_page", :with_featured_events => "sample_with_featured_events", :with_featured_venues => "sample_with_featured_venues", :with_venues => "sample_with_venues", :venue_page => "sample_venue_page", :event_per_page => "sample_event_per_page", :venues_per_page => "sample_venues_per_page", :exclusive_venues => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_location_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_LocationSerializer">LocationSerializer (model)</a>
response = web_api.location_retrieve(pk, :only_fields => "sample_only_fields", :page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :selectable => false, :with_events => "sample_with_events", :event_start_date => "sample_event_start_date", :event_end_date => "sample_event_end_date", :event_page => "sample_event_page", :with_featured_events => "sample_with_featured_events", :with_featured_venues => "sample_with_featured_venues", :with_venues => "sample_with_venues", :venue_page => "sample_venue_page", :event_per_page => "sample_event_per_page", :venues_per_page => "sample_venues_per_page", :exclusive_venues => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_music_get_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_MusicSerializer">MusicSerializer (model)</a>
response = web_api.music_get(:page => "sample_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_AuthIndexResponseSerializer">AuthIndexResponseSerializer (model)</a>
response = web_api.auth_list()
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_post_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_PostPaginationSerializer">PostPaginationSerializer (model)</a>
response = web_api.post_list(:page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :author__id => "sample_author__id", :category__title => "sample_category__title", :title => "sample_title", :featured_posts => "sample_featured_posts", :is_draft => "sample_is_draft")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_post_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_PostSerializer">PostSerializer (model)</a>
response = web_api.post_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_search_get_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
q = "sample_q" # Search criteria
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SearchSerializer">SearchSerializer (model)</a>
response = web_api.search_get(q, :per_page => "sample_per_page", :without_events => "sample_without_events", :without_tracks => "sample_without_tracks", :without_artists => "sample_without_artists", :without_venues => "sample_without_venues", :without_users => "sample_without_users")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_auth_follow_user_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_SuccessSerializer">SuccessSerializer (model)</a>
response = web_api.auth_follow_user(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_unfollow_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_unfollow(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_find_related_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
response = web_api.track_find_related(pk, :only_fields => "sample_only_fields", :find_related => "sample_find_related", :page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :artist__slug => "sample_artist__slug", :my_followed_djs => "sample_my_followed_djs", :artist__id => "sample_artist__id", :artist__genres__key => "sample_artist__genres__key", :artist__genres__id => "sample_artist__genres__id", :reposted_by => "sample_reposted_by", :listened_by => "sample_listened_by")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_like_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_like(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
response = web_api.track_list(:page => "sample_page", :only_fields => "sample_only_fields", :find_related => "sample_find_related", :per_page => "sample_per_page", :ordering => "sample_ordering", :artist__slug => "sample_artist__slug", :my_followed_djs => "sample_my_followed_djs", :artist__id => "sample_artist__id", :artist__genres__key => "sample_artist__genres__key", :artist__genres__id => "sample_artist__genres__id", :reposted_by => "sample_reposted_by", :listened_by => "sample_listened_by")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_retrieve(pk, :with_events => "sample_with_events", :event_page => "sample_event_page", :with_tracks => "sample_with_tracks", :track_page => "sample_track_page", :with_featured_tracks => "sample_with_featured_tracks", :featured_track_page => "sample_featured_track_page", :event_per_page => "sample_event_per_page", :featured_track_per_page => "sample_featured_track_per_page", :track_per_page => "sample_track_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_artist_followers => "sample_with_artist_followers", :artist_followers_page => "sample_artist_followers_page", :artist_followers_per_page => "sample_artist_followers_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ArtistPaginationSerializer">ArtistPaginationSerializer (model)</a>
response = web_api.artist_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :genres__key => "sample_genres__key", :tier => "sample_tier", :with_events => "sample_with_events", :event_page => "sample_event_page", :with_tracks => "sample_with_tracks", :track_page => "sample_track_page", :with_featured_tracks => "sample_with_featured_tracks", :featured_track_page => "sample_featured_track_page", :event_per_page => "sample_event_per_page", :featured_track_per_page => "sample_featured_track_per_page", :track_per_page => "sample_track_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_following => "sample_with_following", :following_page => "sample_following_page", :following_per_page => "sample_following_per_page", :with_following_users => "sample_with_following_users", :following_users_page => "sample_following_users_page", :following_users_per_page => "sample_following_users_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_follow_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ArtistSerializer">ArtistSerializer (model)</a>
response = web_api.artist_follow(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_repost_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_repost(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_trending_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackPaginationSerializer">TrackPaginationSerializer (model)</a>
response = web_api.track_trending(:only_fields => "sample_only_fields", :find_related => "sample_find_related", :page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :artist__slug => "sample_artist__slug", :my_followed_djs => "sample_my_followed_djs", :artist__id => "sample_artist__id", :artist__genres__key => "sample_artist__genres__key", :artist__genres__id => "sample_artist__genres__id", :reposted_by => "sample_reposted_by", :listened_by => "sample_listened_by", :trending__genres__key => "sample_trending__genres__key", :trending__genres__id => "sample_trending__genres__id")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_unlike_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_unlike(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_track_unrepost_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_TrackSerializer">TrackSerializer (model)</a>
response = web_api.track_unrepost(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_artist_claim_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
code = "sample_code" # Soundcloud auth code which will be converted to an access...
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_ClaimSerializer">ClaimSerializer (model)</a>
response = web_api.artist_claim(pk, code)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_venue_list_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_VenuePaginationSerializer">VenuePaginationSerializer (model)</a>
response = web_api.venue_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :event_ordering => "sample_event_ordering", :event_per_page => "sample_event_per_page", :exclusive => false, :location__slug => "sample_location__slug", :with_events => "sample_with_events", :event_page => "sample_event_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def test_venue_retrieve_web
# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return <a href="#model_VenueSerializer">VenueSerializer (model)</a>
response = web_api.venue_retrieve(pk, :with_events => "sample_with_events", :event_ordering => "sample_event_ordering", :event_page => "sample_event_page", :event_per_page => "sample_event_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
end
def main
# Resource: Web
puts "Calling endpoint: artistCreate"
test_artist_create_web
sleep 1
puts "Calling endpoint: trackUpdateTrack"
test_track_update_track_web
sleep 1
puts "Calling endpoint: artistCreateDj"
test_artist_create_dj_web
sleep 1
puts "Calling endpoint: artistFinishClaim"
test_artist_finish_claim_web
sleep 1
puts "Calling endpoint: trackPlayUpdate"
test_track_play_update_web
sleep 1
puts "Calling endpoint: trackPlayNext"
test_track_play_next_web
sleep 1
puts "Calling endpoint: trackPlay"
test_track_play_web
sleep 1
puts "Calling endpoint: trackDeleteTrack"
test_track_delete_track_web
sleep 1
puts "Calling endpoint: authAccessToken"
test_auth_access_token_web
sleep 1
puts "Calling endpoint: authCreateUser"
test_auth_create_user_web
sleep 1
puts "Calling endpoint: trackCreateTrack"
test_track_create_track_web
sleep 1
puts "Calling endpoint: newsletterSignupCreate"
test_newsletter_signup_create_web
sleep 1
puts "Calling endpoint: authResetPasswordComplete"
test_auth_reset_password_complete_web
sleep 1
puts "Calling endpoint: authResetPasswordSendEmail"
test_auth_reset_password_send_email_web
sleep 1
puts "Calling endpoint: eventUpdateEvent"
test_event_update_event_web
sleep 1
puts "Calling endpoint: eventDeleteEvent"
test_event_delete_event_web
sleep 1
puts "Calling endpoint: authUpdateArtistUser"
test_auth_update_artist_user_web
sleep 1
puts "Calling endpoint: authUpdateUser"
test_auth_update_user_web
sleep 1
puts "Calling endpoint: authViewArtistUser"
test_auth_view_artist_user_web
sleep 1
puts "Calling endpoint: authViewUser"
test_auth_view_user_web
sleep 1
puts "Calling endpoint: contactEntryCreate"
test_contact_entry_create_web
sleep 1
puts "Calling endpoint: eventCreateEvent"
test_event_create_event_web
sleep 1
puts "Calling endpoint: eventList"
test_event_list_web
sleep 1
puts "Calling endpoint: djTierGet"
test_dj_tier_get_web
sleep 1
puts "Calling endpoint: eventArtistList"
test_event_artist_list_web
sleep 1
puts "Calling endpoint: eventArtistRetrieve"
test_event_artist_retrieve_web
sleep 1
puts "Calling endpoint: countryList"
test_country_list_web
sleep 1
puts "Calling endpoint: authUnfollowUser"
test_auth_unfollow_user_web
sleep 1
puts "Calling endpoint: countryRetrieve"
test_country_retrieve_web
sleep 1
puts "Calling endpoint: eventRetrieve"
test_event_retrieve_web
sleep 1
puts "Calling endpoint: authStatus"
test_auth_status_web
sleep 1
puts "Calling endpoint: genreArtists"
test_genre_artists_web
sleep 1
puts "Calling endpoint: genreList"
test_genre_list_web
sleep 1
puts "Calling endpoint: genreRetrieve"
test_genre_retrieve_web
sleep 1
puts "Calling endpoint: locationList"
test_location_list_web
sleep 1
puts "Calling endpoint: locationRetrieve"
test_location_retrieve_web
sleep 1
puts "Calling endpoint: musicGet"
test_music_get_web
sleep 1
puts "Calling endpoint: authList"
test_auth_list_web
sleep 1
puts "Calling endpoint: postList"
test_post_list_web
sleep 1
puts "Calling endpoint: postRetrieve"
test_post_retrieve_web
sleep 1
puts "Calling endpoint: searchGet"
test_search_get_web
sleep 1
puts "Calling endpoint: authFollowUser"
test_auth_follow_user_web
sleep 1
puts "Calling endpoint: artistUnfollow"
test_artist_unfollow_web
sleep 1
puts "Calling endpoint: trackFindRelated"
test_track_find_related_web
sleep 1
puts "Calling endpoint: trackLike"
test_track_like_web
sleep 1
puts "Calling endpoint: trackList"
test_track_list_web
sleep 1
puts "Calling endpoint: artistRetrieve"
test_artist_retrieve_web
sleep 1
puts "Calling endpoint: artistList"
test_artist_list_web
sleep 1
puts "Calling endpoint: artistFollow"
test_artist_follow_web
sleep 1
puts "Calling endpoint: trackRepost"
test_track_repost_web
sleep 1
puts "Calling endpoint: trackRetrieve"
test_track_retrieve_web
sleep 1
puts "Calling endpoint: trackTrending"
test_track_trending_web
sleep 1
puts "Calling endpoint: trackUnlike"
test_track_unlike_web
sleep 1
puts "Calling endpoint: trackUnrepost"
test_track_unrepost_web
sleep 1
puts "Calling endpoint: artistClaim"
test_artist_claim_web
sleep 1
puts "Calling endpoint: venueList"
test_venue_list_web
sleep 1
puts "Calling endpoint: venueRetrieve"
test_venue_retrieve_web
sleep 1
end
end
DjsApiTest.new.main if $0 == __FILE__
# Run this file:
# ruby -IDjsApi-ruby/lib djs_api_test.rb// File: DjsApi-java/src/main/scala/com/djs/devcms/DjsApiTestScala.scala
// (create the directory first: mkdir -p DjsApi-java/src/main/scala/com/djs/devcms)
package com.djs.devcms
import java.io.File
import java.util.{List => _, _}
import collection.JavaConversions._
import scala.language.implicitConversions
import com.djs.devcms._
import com.djs.devcms.api._
import com.djs.devcms.auth._
import com.djs.devcms.model._
class DjsApiTestScala {
val apiClient = Configuration.getDefaultApiClient
private def configure {
// apiClient.setBasePath("http://devcms.djs.com")
// configure authentications
var auth: Authentication = null
auth = apiClient.getAuthentication("Default")
auth.asInstanceOf[ApiKeyAuth].setApiKeyPrefix("Token")
auth.asInstanceOf[ApiKeyAuth].setApiKey("YOUR_API_KEY")
}
configure
implicit def toBooleanList(list: List[Boolean]) = seqAsJavaList(list.map(i => i:java.lang.Boolean))
implicit def toFloatList(list: List[Float]) = seqAsJavaList(list.map(i => i:java.lang.Float))
implicit def toIntegerList(list: List[Int]) = seqAsJavaList(list.map(i => i:java.lang.Integer))
def testArtistCreateWeb {
val name = "sampleName" // name
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val description = "sampleDescription" // description
val origin = "sampleOrigin" // origin
val tier = -2147483648L // tier
val yearsActive = "sampleYearsActive" // years_active
val facebook = "sampleFacebook" // facebook
val instagram = "sampleInstagram" // instagram
val twitter = "sampleTwitter" // twitter
val website = "sampleWebsite" // website
val skId = "sampleSkId" // sk_id
val skOnTourUntil = "sampleSkOnTourUntil" // sk_on_tour_until
val skUri = "sampleSkUri" // sk_uri
val managementContacts = "sampleManagementContacts" // management_contacts
val youtube = "sampleYoutube" // youtube
val itunesLink = "sampleItunesLink" // itunes_link
val firstName = "sampleFirstName" // first_name
val middleName = "sampleMiddleName" // middle_name
val lastName = "sampleLastName" // last_name
val musicPlayer = "sampleMusicPlayer" // music_player
val software = "sampleSoftware" // software
val headphones = "sampleHeadphones" // headphones
val hasMixbank = false // has_mixbank
try {
val webApi = new WebApi
val response = webApi.artistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackUpdateTrackWeb {
val pk = "samplePk" // pk
val internalId = "sampleInternalId" // internal_id
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // Slug of track
val title = "sampleTitle" // Track Title
val artworkUrl = "sampleArtworkUrl" // artwork_url
val waveformUrl = "sampleWaveformUrl" // waveform_url
val tagList = "sampleTagList" // tag_list
val kind = "sampleKind" // kind
val genre = "sampleGenre" // genre
val state = "sampleState" // state
val description = "sampleDescription" // Track Description
val favoritingsCount = -2147483648L // favoritings_count
val playbackCount = -2147483648L // playback_count
val uploadedOn = apiClient.parseDate("2014-12-31") // uploaded_on
val isLiked = false // is_liked
val isReposted = false // is_reposted
val imageDownloadUrl = "sampleImageDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val duration = "sampleDuration" // Number of milliseconds of the track
val originalContentSize = "sampleOriginalContentSize" // Original Content size
try {
val webApi = new WebApi
val response = webApi.trackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistCreateDjWeb {
val name = "sampleName" // DJ Name of artist
val email = "sampleEmail" // Email of artist
val password = "samplePassword" // Password
val genreIds = "sampleGenreIds" // CSV of internal genre slugs/keys to associate with the...
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val description = "sampleDescription" // description
val origin = "sampleOrigin" // origin
val tier = -2147483648L // tier
val yearsActive = "sampleYearsActive" // years_active
val facebook = "sampleFacebook" // facebook
val instagram = "sampleInstagram" // instagram
val twitter = "sampleTwitter" // twitter
val website = "sampleWebsite" // website
val skId = "sampleSkId" // sk_id
val skOnTourUntil = "sampleSkOnTourUntil" // sk_on_tour_until
val skUri = "sampleSkUri" // sk_uri
val managementContacts = "sampleManagementContacts" // management_contacts
val youtube = "sampleYoutube" // youtube
val itunesLink = "sampleItunesLink" // itunes_link
val firstName = "sampleFirstName" // first_name
val middleName = "sampleMiddleName" // middle_name
val lastName = "sampleLastName" // last_name
val musicPlayer = "sampleMusicPlayer" // music_player
val software = "sampleSoftware" // software
val headphones = "sampleHeadphones" // headphones
val hasMixbank = false // has_mixbank
val soundCloudId = "sampleSoundCloudId" // Soundcloud internal ID
val soundCloudUrl = "sampleSoundCloudUrl" // Soundcloud URL
val code = "sampleCode" // Soundcloud auth code which will be converted to an access...
try {
val webApi = new WebApi
val response = webApi.artistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistFinishClaimWeb {
val pk = "samplePk" // pk
val name = "sampleName" // name
val email = "sampleEmail" // New dj email
val password = "samplePassword" // New dj password
val accessToken = "sampleAccessToken" // Soundcloud access token given back to you on first claim...
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val description = "sampleDescription" // description
val origin = "sampleOrigin" // origin
val tier = -2147483648L // tier
val yearsActive = "sampleYearsActive" // years_active
val facebook = "sampleFacebook" // facebook
val instagram = "sampleInstagram" // instagram
val twitter = "sampleTwitter" // twitter
val website = "sampleWebsite" // website
val skId = "sampleSkId" // sk_id
val skOnTourUntil = "sampleSkOnTourUntil" // sk_on_tour_until
val skUri = "sampleSkUri" // sk_uri
val managementContacts = "sampleManagementContacts" // management_contacts
val youtube = "sampleYoutube" // youtube
val itunesLink = "sampleItunesLink" // itunes_link
val firstName = "sampleFirstName" // first_name
val middleName = "sampleMiddleName" // middle_name
val lastName = "sampleLastName" // last_name
val musicPlayer = "sampleMusicPlayer" // music_player
val software = "sampleSoftware" // software
val headphones = "sampleHeadphones" // headphones
val hasMixbank = false // has_mixbank
try {
val webApi = new WebApi
val response = webApi.artistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackPlayUpdateWeb {
val analyticsKey = "sampleAnalyticsKey" // The analytics key provided by the ``play`` API call.
val duration = "sampleDuration" // Duration of the audio play session.
val maxTimecode = "sampleMaxTimecode" // The max timecode played during this session.
try {
val webApi = new WebApi
val response = webApi.trackPlayUpdate(analyticsKey, duration, maxTimecode)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackPlayNextWeb {
val currentArtistSkId = "sampleCurrentArtistSkId" // Internal ID of the track
val currentTrackInternalId = "sampleCurrentTrackInternalId" // SK ID of the artist
val mode = "sampleMode" // Play Mode (Valid values are "artist", "genre",...
val ipAddress = "sampleIpAddress" // IP Address of requestor
val genreKey = "sampleGenreKey" // If you use genre as a mode, this is required
val playedTracks = "samplePlayedTracks" // A JSON object with a list of all played tracks to filter...
try {
val webApi = new WebApi
val response = webApi.trackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackPlayWeb {
val artistSkId = "sampleArtistSkId" // SK ID of the artist
val trackInternalId = "sampleTrackInternalId" // Internal ID of the track
val ipAddress = "sampleIpAddress" // IP Address of requestor
try {
val webApi = new WebApi
val response = webApi.trackPlay(artistSkId, trackInternalId, ipAddress)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackDeleteTrackWeb {
val pk = "samplePk" // pk
val internalId = "sampleInternalId" // internal_id
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val title = "sampleTitle" // title
val artworkUrl = "sampleArtworkUrl" // artwork_url
val waveformUrl = "sampleWaveformUrl" // waveform_url
val tagList = "sampleTagList" // tag_list
val kind = "sampleKind" // kind
val genre = "sampleGenre" // genre
val state = "sampleState" // state
val description = "sampleDescription" // description
val favoritingsCount = -2147483648L // favoritings_count
val playbackCount = -2147483648L // playback_count
val uploadedOn = apiClient.parseDate("2014-12-31") // uploaded_on
val isLiked = false // is_liked
val isReposted = false // is_reposted
try {
val webApi = new WebApi
val response = webApi.trackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthAccessTokenWeb {
val apiSecret = "sampleApiSecret" // API Secret Given To Your App
val apiKey = "sampleApiKey" // API Key Given To Your App
val username = "sampleUsername" // Username logging in
val password = "samplePassword" // Password logging in
try {
val webApi = new WebApi
val response = webApi.authAccessToken(apiSecret, apiKey, username, password)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthCreateUserWeb {
val email = "sampleEmail" // email address
val password = "samplePassword" // password
val facebookId = "sampleFacebookId" // Facebook internal user id if this is a facebook user
val planSlug = "samplePlanSlug" // Must be either pro_trial, pro or free of what type of...
val firstName = "sampleFirstName" // First Name
val lastName = "sampleLastName" // Last Name
val imageDownloadUrl = "sampleImageDownloadUrl" // URL On the web to download and assign to profile
val instagram = "sampleInstagram" // instagram URL or slug
val closestLocation = "sampleClosestLocation" // Users closest location with the slug of the location they...
val facebook = "sampleFacebook" // facebook URL or slug
val website = "sampleWebsite" // website URL - FYI all schemes will be stripped and you...
val twitter = "sampleTwitter" // twitter URL or slug
val description = "sampleDescription" // Stream user profile description
try {
val webApi = new WebApi
val response = webApi.authCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackCreateTrackWeb {
val title = "sampleTitle" // Track Title
val internalId = "sampleInternalId" // internal_id
val description = "sampleDescription" // Track Description
val imageDownloadUrl = "sampleImageDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val duration = "sampleDuration" // Number of milliseconds of the track
val originalContentSize = "sampleOriginalContentSize" // Original Content size
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val tagList = "sampleTagList" // tag_list
val waveformUrl = "sampleWaveformUrl" // waveform_url
val slug = "sampleSlug" // slug
val artworkUrl = "sampleArtworkUrl" // artwork_url
val playbackCount = -2147483648L // playback_count
val state = "sampleState" // state
val favoritingsCount = -2147483648L // favoritings_count
val genre = "sampleGenre" // genre
val kind = "sampleKind" // kind
val uploadedOn = apiClient.parseDate("2014-12-31") // uploaded_on
val isLiked = false // is_liked
val isReposted = false // is_reposted
try {
val webApi = new WebApi
val response = webApi.trackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testNewsletterSignupCreateWeb {
val email = "sampleEmail" // Contact Email
val name = "sampleName" // Contact Name
val listOverride = "sampleListOverride" // Mailchimp override
try {
val webApi = new WebApi
val response = webApi.newsletterSignupCreate(email, name, listOverride)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthResetPasswordCompleteWeb {
val token = "sampleToken" // Token
val newPassword = "sampleNewPassword" // New Password
val email = "sampleEmail" // Email
try {
val webApi = new WebApi
val response = webApi.authResetPasswordComplete(token, newPassword, email)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthResetPasswordSendEmailWeb {
val email = "sampleEmail" // User email
try {
val webApi = new WebApi
val response = webApi.authResetPasswordSendEmail(email)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventUpdateEventWeb {
val pk = "samplePk" // pk
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val displayName = "sampleDisplayName" // Event Display Name
val eventDateStart = apiClient.parseDate("2014-12-31") // event_date_start
val eventDateEnd = apiClient.parseDate("2014-12-31") // event_date_end
val eventEndTime = "sampleEventEndTime" // event_end_time
val eventStartTime = "sampleEventStartTime" // event_start_time
val skId = "sampleSkId" // sk_id
val eventType = "sampleEventType" // event_type
val ageRestriction = "sampleAgeRestriction" // age_restriction
val seriesName = "sampleSeriesName" // series_name
val popularity = "samplePopularity" // popularity
val uri = "sampleUri" // URI of the ticket link
val disabled = false // disabled
val venue = "sampleVenue" // venue
val imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl" // A publicly accessible Jumbotron URL so the file can be...
val venueSlug = "sampleVenueSlug" // Slug of the venue
val eventDate = "sampleEventDate" // US Date formatted Date
val eventTime = "sampleEventTime" // Military time of event start
val artistSlug = "sampleArtistSlug" // Artist creating this item
try {
val webApi = new WebApi
val response = webApi.eventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventDeleteEventWeb {
val pk = "samplePk" // pk
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val displayName = "sampleDisplayName" // display_name
val eventDateStart = apiClient.parseDate("2014-12-31") // event_date_start
val eventDateEnd = apiClient.parseDate("2014-12-31") // event_date_end
val eventEndTime = "sampleEventEndTime" // event_end_time
val eventStartTime = "sampleEventStartTime" // event_start_time
val skId = "sampleSkId" // sk_id
val eventType = "sampleEventType" // event_type
val ageRestriction = "sampleAgeRestriction" // age_restriction
val seriesName = "sampleSeriesName" // series_name
val popularity = "samplePopularity" // popularity
val uri = "sampleUri" // uri
val disabled = false // disabled
val venue = "sampleVenue" // venue
try {
val webApi = new WebApi
val response = webApi.eventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthUpdateArtistUserWeb {
val pk = "samplePk" // pk
val itunesLink = "sampleItunesLink" // Itunes URL (Fully qualified)
val youtube = "sampleYoutube" // youtube Slug
val contactEmail = "sampleContactEmail" // Email business contact
val djName = "sampleDjName" // DJ Name
val paymentAddress1 = "samplePaymentAddress1" // Payment Address 1
val paymentAddress2 = "samplePaymentAddress2" // Payment Address 2
val paymentCity = "samplePaymentCity" // Payment City
val paymentState = "samplePaymentState" // Payment State
val paymentZip = "samplePaymentZip" // Payment Zip
val country = "sampleCountry" // Country Code
val soundcloudUsername = "sampleSoundcloudUsername" // Soundcloud username
val paymentEin = "samplePaymentEin" // Payment EIN Number
val email = "sampleEmail" // email address in which the user logs in as
val password = "samplePassword" // password
val firstName = "sampleFirstName" // First Name
val planSlug = "samplePlanSlug" // Must be either pro_trial, pro or free of what type of...
val slug = "sampleSlug" // User slug
val lastName = "sampleLastName" // Last Name
val imageDownloadUrl = "sampleImageDownloadUrl" // URL On the web to download and assign to profile
val instagram = "sampleInstagram" // instagram URL or slug
val facebook = "sampleFacebook" // facebook URL or slug
val website = "sampleWebsite" // website URL - FYI all schemes will be stripped and you...
val twitter = "sampleTwitter" // twitter URL or slug
val description = "sampleDescription" // User profile description
try {
val webApi = new WebApi
val response = webApi.authUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthUpdateUserWeb {
val pk = "samplePk" // pk
val closestLocation = "sampleClosestLocation" // Update users closest location with the slug of the...
val email = "sampleEmail" // email address in which the user logs in as
val password = "samplePassword" // password
val firstName = "sampleFirstName" // First Name
val planSlug = "samplePlanSlug" // Must be either pro_trial, pro or free of what type of...
val slug = "sampleSlug" // User slug
val lastName = "sampleLastName" // Last Name
val imageDownloadUrl = "sampleImageDownloadUrl" // URL On the web to download and assign to profile
val instagram = "sampleInstagram" // instagram URL or slug
val facebook = "sampleFacebook" // facebook URL or slug
val website = "sampleWebsite" // website URL - FYI all schemes will be stripped and you...
val twitter = "sampleTwitter" // twitter URL or slug
val description = "sampleDescription" // User profile description
try {
val webApi = new WebApi
val response = webApi.authUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthViewArtistUserWeb {
val pk = "samplePk" // pk
val withFavorites = "sampleWithFavorites" // Fetch favorites the "favorites" index.
val favoritePage = "sampleFavoritePage" // Paginate through more favorites by increasing by one. ...
val favoritePerPage = "sampleFavoritePerPage" // How many per page you would like (Default is 16 favorites)
val withFollowing = "sampleWithFollowing" // Fetch favorites the "following" index.
val followingPage = "sampleFollowingPage" // Paginate through more following djs by increasing by one....
val followingPerPage = "sampleFollowingPerPage" // How many per page you would like (Default is 16 following)
val withFollowingUsers = "sampleWithFollowingUsers" // Fetch favorites the "following_users" index.
val followingUsersPage = "sampleFollowingUsersPage" // Paginate through more following users by increasing by...
val followingUsersPerPage = "sampleFollowingUsersPerPage" // How many per page you would like (Default is 16 following)
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withArtistFollowers = "sampleWithArtistFollowers" // Fetch djs who are followers in the "artist_followers" index.
val artistFollowersPage = "sampleArtistFollowersPage" // Paginate through more follower djs by increasing by one. ...
val artistFollowersPerPage = "sampleArtistFollowersPerPage" // How many per page you would like (Default is 16...
try {
val webApi = new WebApi
val response = webApi.authViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthViewUserWeb {
val pk = "samplePk" // pk
val withFavorites = "sampleWithFavorites" // Fetch favorites the "favorites" index.
val favoritePage = "sampleFavoritePage" // Paginate through more favorites by increasing by one. ...
val favoritePerPage = "sampleFavoritePerPage" // How many per page you would like (Default is 16 favorites)
val withFollowing = "sampleWithFollowing" // Fetch favorites the "following" index.
val followingPage = "sampleFollowingPage" // Paginate through more following djs by increasing by one....
val followingPerPage = "sampleFollowingPerPage" // How many per page you would like (Default is 16 following)
val withFollowingUsers = "sampleWithFollowingUsers" // Fetch favorites the "following_users" index.
val followingUsersPage = "sampleFollowingUsersPage" // Paginate through more following users by increasing by...
val followingUsersPerPage = "sampleFollowingUsersPerPage" // How many per page you would like (Default is 16 following)
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withArtistFollowers = "sampleWithArtistFollowers" // Fetch djs who are followers in the "artist_followers" index.
val artistFollowersPage = "sampleArtistFollowersPage" // Paginate through more follower djs by increasing by one. ...
val artistFollowersPerPage = "sampleArtistFollowersPerPage" // How many per page you would like (Default is 16...
try {
val webApi = new WebApi
val response = webApi.authViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testContactEntryCreateWeb {
val name = "sampleName" // Contact Name
val email = "sampleEmail" // Contact Email
val comments = "sampleComments" // Comments
val phone = "samplePhone" // Contact Phone
try {
val webApi = new WebApi
val response = webApi.contactEntryCreate(name, email, comments, phone)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventCreateEventWeb {
val displayName = "sampleDisplayName" // Event Display Name
val uri = "sampleUri" // URI of the ticket link
val imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl" // A publicly accessible Jumbotron URL so the file can be...
val venueSlug = "sampleVenueSlug" // Slug of the venue
val eventDate = "sampleEventDate" // US Date formatted Date
val eventTime = "sampleEventTime" // Military time of event start
val artistSlug = "sampleArtistSlug" // Artist creating this item
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val eventDateStart = apiClient.parseDate("2014-12-31") // event_date_start
val eventDateEnd = apiClient.parseDate("2014-12-31") // event_date_end
val eventEndTime = "sampleEventEndTime" // event_end_time
val eventStartTime = "sampleEventStartTime" // event_start_time
val skId = "sampleSkId" // sk_id
val eventType = "sampleEventType" // event_type
val seriesName = "sampleSeriesName" // series_name
val popularity = "samplePopularity" // popularity
val ageRestriction = "sampleAgeRestriction" // age_restriction
val disabled = false // disabled
val venue = "sampleVenue" // venue
try {
val webApi = new WebApi
val response = webApi.eventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventListWeb {
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistsArtistSlug = "sampleArtistsArtistSlug" // Filter by artist slug
try {
val webApi = new WebApi
val response = webApi.eventList(page, onlyFields, perPage, ordering, artistsArtistSlug)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testDjTierGetWeb {
val page = "samplePage" // How many results to be returned in each category
val genre = "sampleGenre" // Which genre key to filter on
val genreId = "sampleGenreId" // Which genre id/pk to filter on
try {
val webApi = new WebApi
val response = webApi.djTierGet(page, genre, genreId)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventArtistListWeb {
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val displayName = "sampleDisplayName" // Search by display name of artist
try {
val webApi = new WebApi
val response = webApi.eventArtistList(page, perPage, ordering, displayName)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventArtistRetrieveWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.eventArtistRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testCountryListWeb {
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
try {
val webApi = new WebApi
val response = webApi.countryList(page, perPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthUnfollowUserWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.authUnfollowUser(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testCountryRetrieveWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.countryRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testEventRetrieveWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.eventRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthStatusWeb {
try {
val webApi = new WebApi
val response = webApi.authStatus()
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testGenreArtistsWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.genreArtists(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testGenreListWeb {
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
try {
val webApi = new WebApi
val response = webApi.genreList(page, perPage, ordering)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testGenreRetrieveWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.genreRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testLocationListWeb {
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val selectable = false // Selectable are the locations that we have designated are...
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventStartDate = "sampleEventStartDate" // Start date range (end date range required if start is...
val eventEndDate = "sampleEventEndDate" // End date range (start date range required if start is...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withFeaturedEvents = "sampleWithFeaturedEvents" // Fetch all featured events into the "featured_events" index.
val withFeaturedVenues = "sampleWithFeaturedVenues" // Fetch all featured venues into the "featured_venues" index.
val withVenues = "sampleWithVenues" // Fetch 20 related Location Venues. Into the a new "venues"...
val venuePage = "sampleVenuePage" // Paginate through more venues by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
val venuesPerPage = "sampleVenuesPerPage" // How many per page you would like (Default is 12 venues)
val exclusiveVenues = false // Boolean flag used to show which venues we have full blown...
try {
val webApi = new WebApi
val response = webApi.locationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testLocationRetrieveWeb {
val pk = "samplePk" // pk
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val selectable = false // Selectable are the locations that we have designated are...
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventStartDate = "sampleEventStartDate" // Start date range (end date range required if start is...
val eventEndDate = "sampleEventEndDate" // End date range (start date range required if start is...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withFeaturedEvents = "sampleWithFeaturedEvents" // Fetch all featured events into the "featured_events" index.
val withFeaturedVenues = "sampleWithFeaturedVenues" // Fetch all featured venues into the "featured_venues" index.
val withVenues = "sampleWithVenues" // Fetch 20 related Location Venues. Into the a new "venues"...
val venuePage = "sampleVenuePage" // Paginate through more venues by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
val venuesPerPage = "sampleVenuesPerPage" // How many per page you would like (Default is 12 venues)
val exclusiveVenues = false // Boolean flag used to show which venues we have full blown...
try {
val webApi = new WebApi
val response = webApi.locationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testMusicGetWeb {
val page = "samplePage" // How many results to be returned in each category
try {
val webApi = new WebApi
val response = webApi.musicGet(page)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthListWeb {
try {
val webApi = new WebApi
val response = webApi.authList()
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testPostListWeb {
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val authorId = "sampleAuthorId" // ID of author to filter
val categoryTitle = "sampleCategoryTitle" // Category string to filter by
val title = "sampleTitle" // Filter by blog post title
val featuredPosts = "sampleFeaturedPosts" // Filter by featured_posts. Just pass True to get all the...
val isDraft = "sampleIsDraft" // Filter by is_draft
try {
val webApi = new WebApi
val response = webApi.postList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testPostRetrieveWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.postRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testSearchGetWeb {
val q = "sampleQ" // Search criteria
val perPage = "samplePerPage" // How many results to be returned in each category
val withoutEvents = "sampleWithoutEvents" // Skip showing the "event" index.
val withoutTracks = "sampleWithoutTracks" // Skip showing the "track" index.
val withoutArtists = "sampleWithoutArtists" // Skip showing the "artist" index.
val withoutVenues = "sampleWithoutVenues" // Skip showing the "venue" index.
val withoutUsers = "sampleWithoutUsers" // Skip showing the "users" index.
try {
val webApi = new WebApi
val response = webApi.searchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testAuthFollowUserWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.authFollowUser(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistUnfollowWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.artistUnfollow(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackFindRelatedWeb {
val pk = "samplePk" // pk
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val findRelated = "sampleFindRelated" // Find all related tracks for a given single track
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistSlug = "sampleArtistSlug" // Search and filter by all tracks by a particular artist slug
val myFollowedDjs = "sampleMyFollowedDjs" // Get a list of tracks based on those of whom you the...
val artistId = "sampleArtistId" // Search and filter by all tracks by a particular artist ID
val artistGenresKey = "sampleArtistGenresKey" // Search and filter by all tracks by a particular key/slug...
val artistGenresId = "sampleArtistGenresId" // Search and filter by all tracks by a particular genre ID...
val repostedBy = "sampleRepostedBy" // Search by slug or ID of a stream user to get all the...
val listenedBy = "sampleListenedBy" // Search by slug or ID of a stream user to get all the...
try {
val webApi = new WebApi
val response = webApi.trackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackLikeWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackLike(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackListWeb {
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val findRelated = "sampleFindRelated" // Find all related tracks for a given single track
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistSlug = "sampleArtistSlug" // Search and filter by all tracks by a particular artist slug
val myFollowedDjs = "sampleMyFollowedDjs" // Get a list of tracks based on those of whom you the...
val artistId = "sampleArtistId" // Search and filter by all tracks by a particular artist ID
val artistGenresKey = "sampleArtistGenresKey" // Search and filter by all tracks by a particular key/slug...
val artistGenresId = "sampleArtistGenresId" // Search and filter by all tracks by a particular genre ID...
val repostedBy = "sampleRepostedBy" // Search by slug or ID of a stream user to get all the...
val listenedBy = "sampleListenedBy" // Search by slug or ID of a stream user to get all the...
try {
val webApi = new WebApi
val response = webApi.trackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistRetrieveWeb {
val pk = "samplePk" // pk
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withTracks = "sampleWithTracks" // Fetch 20 related Dj tracks. Into the a new "tracks" index.
val trackPage = "sampleTrackPage" // Paginate through more tracks by increasing by one. ...
val withFeaturedTracks = "sampleWithFeaturedTracks" // Fetch 3 featured Dj tracks. Into the a new...
val featuredTrackPage = "sampleFeaturedTrackPage" // Paginate through more tracks by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 20 events)
val featuredTrackPerPage = "sampleFeaturedTrackPerPage" // How many per page you would like (Default is 3 featured...
val trackPerPage = "sampleTrackPerPage" // How many per page you would like (Default is 9 featured...
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withArtistFollowers = "sampleWithArtistFollowers" // Fetch favorites the "artist_followers" index.
val artistFollowersPage = "sampleArtistFollowersPage" // Paginate through more artist_follower users by increasing...
val artistFollowersPerPage = "sampleArtistFollowersPerPage" // How many per page you would like (Default is 16...
try {
val webApi = new WebApi
val response = webApi.artistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistListWeb {
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val genresKey = "sampleGenresKey" // Filter artists by genre key
val tier = "sampleTier" // Filter by artist tier
val withEvents = "sampleWithEvents" // Fetch related Dj events. Into the a new "events" index.
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withTracks = "sampleWithTracks" // Fetch 10 related Dj tracks. Into the a new "tracks" index.
val trackPage = "sampleTrackPage" // Paginate through more tracks by increasing by one. ...
val withFeaturedTracks = "sampleWithFeaturedTracks" // Fetch featured Dj tracks. Into the a new...
val featuredTrackPage = "sampleFeaturedTrackPage" // Paginate through more tracks by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 20 events)
val featuredTrackPerPage = "sampleFeaturedTrackPerPage" // How many per page you would like (Default is 3 featured...
val trackPerPage = "sampleTrackPerPage" // How many per page you would like (Default is 9 featured...
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withFollowing = "sampleWithFollowing" // Fetch favorites the "following" index.
val followingPage = "sampleFollowingPage" // Paginate through more following djs by increasing by one....
val followingPerPage = "sampleFollowingPerPage" // How many per page you would like (Default is 16 following)
val withFollowingUsers = "sampleWithFollowingUsers" // Fetch favorites the "following_users" index.
val followingUsersPage = "sampleFollowingUsersPage" // Paginate through more following users by increasing by...
val followingUsersPerPage = "sampleFollowingUsersPerPage" // How many per page you would like (Default is 16 following)
try {
val webApi = new WebApi
val response = webApi.artistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistFollowWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.artistFollow(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackRepostWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackRepost(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackRetrieveWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackTrendingWeb {
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val findRelated = "sampleFindRelated" // Find all related tracks for a given single track
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistSlug = "sampleArtistSlug" // Search and filter by all tracks by a particular artist slug
val myFollowedDjs = "sampleMyFollowedDjs" // Get a list of tracks based on those of whom you the...
val artistId = "sampleArtistId" // Search and filter by all tracks by a particular artist ID
val artistGenresKey = "sampleArtistGenresKey" // Search and filter by all tracks by a particular key/slug...
val artistGenresId = "sampleArtistGenresId" // Search and filter by all tracks by a particular genre ID...
val repostedBy = "sampleRepostedBy" // Search by slug or ID of a stream user to get all the...
val listenedBy = "sampleListenedBy" // Search by slug or ID of a stream user to get all the...
val trendingGenresKey = "sampleTrendingGenresKey" // Additionally filter the genres (by key/slug) of the...
val trendingGenresId = "sampleTrendingGenresId" // Additionally filter the genres (by ID) of the trending...
try {
val webApi = new WebApi
val response = webApi.trackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackUnlikeWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackUnlike(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testTrackUnrepostWeb {
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackUnrepost(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testArtistClaimWeb {
val pk = "samplePk" // pk
val code = "sampleCode" // Soundcloud auth code which will be converted to an access...
try {
val webApi = new WebApi
val response = webApi.artistClaim(pk, code)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testVenueListWeb {
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val eventOrdering = "sampleEventOrdering" // Order the event resultset with ordering=-popularity. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
val exclusive = false // Boolean flag used to show which venues we have full blown...
val locationSlug = "sampleLocationSlug" // Filter by venue location slug
val withEvents = "sampleWithEvents" // Fetch 12 related venue events. Into the a new "events"...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
try {
val webApi = new WebApi
val response = webApi.venueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def testVenueRetrieveWeb {
val pk = "samplePk" // pk
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventOrdering = "sampleEventOrdering" // Order the event resultset by event__popularity with...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
try {
val webApi = new WebApi
val response = webApi.venueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
}
def sleep(milliseconds: Int) {
try {
Thread.sleep(milliseconds)
} catch {
case e: InterruptedException => throw new RuntimeException(e)
}
}
def testAll {
/* Resource: Web */
println("Calling endpoint: artistCreate")
testArtistCreateWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackUpdateTrack")
testTrackUpdateTrackWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistCreateDj")
testArtistCreateDjWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistFinishClaim")
testArtistFinishClaimWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackPlayUpdate")
testTrackPlayUpdateWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackPlayNext")
testTrackPlayNextWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackPlay")
testTrackPlayWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackDeleteTrack")
testTrackDeleteTrackWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authAccessToken")
testAuthAccessTokenWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authCreateUser")
testAuthCreateUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackCreateTrack")
testTrackCreateTrackWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: newsletterSignupCreate")
testNewsletterSignupCreateWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authResetPasswordComplete")
testAuthResetPasswordCompleteWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authResetPasswordSendEmail")
testAuthResetPasswordSendEmailWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventUpdateEvent")
testEventUpdateEventWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventDeleteEvent")
testEventDeleteEventWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authUpdateArtistUser")
testAuthUpdateArtistUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authUpdateUser")
testAuthUpdateUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authViewArtistUser")
testAuthViewArtistUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authViewUser")
testAuthViewUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: contactEntryCreate")
testContactEntryCreateWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventCreateEvent")
testEventCreateEventWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventList")
testEventListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: djTierGet")
testDjTierGetWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventArtistList")
testEventArtistListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventArtistRetrieve")
testEventArtistRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: countryList")
testCountryListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authUnfollowUser")
testAuthUnfollowUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: countryRetrieve")
testCountryRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: eventRetrieve")
testEventRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authStatus")
testAuthStatusWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: genreArtists")
testGenreArtistsWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: genreList")
testGenreListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: genreRetrieve")
testGenreRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: locationList")
testLocationListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: locationRetrieve")
testLocationRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: musicGet")
testMusicGetWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authList")
testAuthListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: postList")
testPostListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: postRetrieve")
testPostRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: searchGet")
testSearchGetWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: authFollowUser")
testAuthFollowUserWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistUnfollow")
testArtistUnfollowWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackFindRelated")
testTrackFindRelatedWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackLike")
testTrackLikeWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackList")
testTrackListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistRetrieve")
testArtistRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistList")
testArtistListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistFollow")
testArtistFollowWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackRepost")
testTrackRepostWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackRetrieve")
testTrackRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackTrending")
testTrackTrendingWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackUnlike")
testTrackUnlikeWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: trackUnrepost")
testTrackUnrepostWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: artistClaim")
testArtistClaimWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: venueList")
testVenueListWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
println("Calling endpoint: venueRetrieve")
testVenueRetrieveWeb
sleep(1000) // sleep for 1s to avoid rate limiting, if any
}
}
object DjsApiTestScala {
def main(args: Array[String]) {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"))
val test = new DjsApiTestScala
test.testAll
}
}
// Run this file:
// cd DjsApi-java
// sbt runWeb
artistClaim
Claim a DJ Page with a soundcloud
GET http://devcms.djs.com/api/artists/:pk/claim/
Claim a DJ Page with a soundcloud
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| code | String | URL query string | Soundcloud auth code which will be converted to an access token and verified against the assigned DJ soundcloud profile |
Request preview:
GET /api/artists/PK/claim/?code=CODE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns ClaimSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| 501 | You must be logged in as the appropriate soundcloud user 'xxx' |
| 502 | DJ already claimed |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var code: String = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try
{
var webApi: WebApi = new WebApi();
var response: ClaimSerializer = webApi.artist_claim(pk, code);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ClaimSerializer response = webApi.artistClaim(pk, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/artists/<pk>/claim/?code=<code>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ClaimSerializer response = webApi.ArtistClaim(pk, code);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ClaimSerializer response = webApi.artistClaim(pk, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['code'] = "sampleCode"; // Soundcloud auth code which will be converted to an access...
swagger.Web.artistClaim(args, function(response) {
/* success callback */
console.log("Result of Web.artistClaim");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistClaim:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *code = @"sampleCode"; // Soundcloud auth code which will be converted to an access...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistClaimWithCompletionBlock:pk
code:code
completionHandler:^(SWGClaimSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ClaimSerializer (model)
$response = $web_api->artistClaim($pk, $code);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
code = "sample_code" # Soundcloud auth code which will be converted to an access...
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ClaimSerializer (model)
response = web_api.artist_claim(pk, code)
pprint(response)
# asynchronous call
# thread = web_api.artist_claim(pk, code, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
code = "sample_code" # Soundcloud auth code which will be converted to an access...
begin
web_api = DjsApi::WebApi.new
# return ClaimSerializer (model)
response = web_api.artist_claim(pk, code)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val code = "sampleCode" // Soundcloud auth code which will be converted to an access...
try {
val webApi = new WebApi
val response = webApi.artistClaim(pk, code)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistCreate
POST http://devcms.djs.com/api/artists/
Please provide a description for the endpoint
| Name | Type | Location | Description | |
|---|---|---|---|---|
| name | String | HTTP Form | name | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| description | String | HTTP Form | description | |
| origin | String | HTTP Form | origin | |
| tier | Integer (signed 64 bits) | HTTP Form | tier Minimum: -2147483648 Maximum: 2147483647 | |
| years_active | String | HTTP Form | years_active | |
| String | HTTP Form | |||
| String | HTTP Form | |||
| String | HTTP Form | |||
| website | String | HTTP Form | website | |
| sk_id | String | HTTP Form | sk_id | |
| sk_on_tour_until | String | HTTP Form | sk_on_tour_until | |
| sk_uri | String | HTTP Form | sk_uri | |
| management_contacts | String | HTTP Form | management_contacts | |
| youtube | String | HTTP Form | youtube | |
| itunes_link | String | HTTP Form | itunes_link | |
| first_name | String | HTTP Form | first_name | |
| middle_name | String | HTTP Form | middle_name | |
| last_name | String | HTTP Form | last_name | |
| music_player | String | HTTP Form | music_player | |
| software | String | HTTP Form | software | |
| headphones | String | HTTP Form | headphones | |
| has_mixbank | Boolean | HTTP Form | has_mixbank |
Request preview:
POST /api/artists/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
description=DESCRIPTION&facebook=FACEBOOK&first_name=FIRST_NAME&has_mixbank=HAS_MIXBANK&headphones=HEADPHONES&instagram=INSTAGRAM&itunes_link=ITUNES_LINK&last_name=LAST_NAME&management_contacts=MANAGEMENT_CONTACTS&meta_description=META_DESCRIPTION&meta_title=META_TITLE&middle_name=MIDDLE_NAME&music_player=MUSIC_PLAYER&name=NAME&origin=ORIGIN&sk_id=SK_ID&sk_on_tour_until=SK_ON_TOUR_UNTIL&sk_uri=SK_URI&slug=SLUG&software=SOFTWARE&tier=-2147483648&twitter=TWITTER&website=WEBSITE&years_active=YEARS_ACTIVE&youtube=YOUTUBEThis endpoint returns ArtistSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var name: String = "sampleName"; // name
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var description: String = "sampleDescription"; // description
var origin: String = "sampleOrigin"; // origin
var tier: Number = -2147483648; // tier
var yearsActive: String = "sampleYearsActive"; // years_active
var facebook: String = "sampleFacebook"; // facebook
var instagram: String = "sampleInstagram"; // instagram
var twitter: String = "sampleTwitter"; // twitter
var website: String = "sampleWebsite"; // website
var skId: String = "sampleSkId"; // sk_id
var skOnTourUntil: String = "sampleSkOnTourUntil"; // sk_on_tour_until
var skUri: String = "sampleSkUri"; // sk_uri
var managementContacts: String = "sampleManagementContacts"; // management_contacts
var youtube: String = "sampleYoutube"; // youtube
var itunesLink: String = "sampleItunesLink"; // itunes_link
var firstName: String = "sampleFirstName"; // first_name
var middleName: String = "sampleMiddleName"; // middle_name
var lastName: String = "sampleLastName"; // last_name
var musicPlayer: String = "sampleMusicPlayer"; // music_player
var software: String = "sampleSoftware"; // software
var headphones: String = "sampleHeadphones"; // headphones
var hasMixbank: Boolean = True; // has_mixbank
try
{
var webApi: WebApi = new WebApi();
var response: ArtistSerializer = webApi.artist_create(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
}
catch (e:Error)
{
trace(e)
}
String name = "sampleName"; // name
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/artists/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "name=<name>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "description=<description>" \
-d "origin=<origin>" \
-d "tier=-2147483648" \
-d "years_active=<years_active>" \
-d "facebook=<facebook>" \
-d "instagram=<instagram>" \
-d "twitter=<twitter>" \
-d "website=<website>" \
-d "sk_id=<sk_id>" \
-d "sk_on_tour_until=<sk_on_tour_until>" \
-d "sk_uri=<sk_uri>" \
-d "management_contacts=<management_contacts>" \
-d "youtube=<youtube>" \
-d "itunes_link=<itunes_link>" \
-d "first_name=<first_name>" \
-d "middle_name=<middle_name>" \
-d "last_name=<last_name>" \
-d "music_player=<music_player>" \
-d "software=<software>" \
-d "headphones=<headphones>" \
-d "has_mixbank=<has_mixbank>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String name = "sampleName"; // name
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
long? tier = -2147483648; // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
bool? hasMixbank = false; // has_mixbank
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String name = "sampleName"; // name
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['name'] = "sampleName"; // name
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['description'] = "sampleDescription"; // description
args['origin'] = "sampleOrigin"; // origin
args['tier'] = -2147483648; // tier
args['years_active'] = "sampleYearsActive"; // years_active
args['facebook'] = "sampleFacebook"; // facebook
args['instagram'] = "sampleInstagram"; // instagram
args['twitter'] = "sampleTwitter"; // twitter
args['website'] = "sampleWebsite"; // website
args['sk_id'] = "sampleSkId"; // sk_id
args['sk_on_tour_until'] = "sampleSkOnTourUntil"; // sk_on_tour_until
args['sk_uri'] = "sampleSkUri"; // sk_uri
args['management_contacts'] = "sampleManagementContacts"; // management_contacts
args['youtube'] = "sampleYoutube"; // youtube
args['itunes_link'] = "sampleItunesLink"; // itunes_link
args['first_name'] = "sampleFirstName"; // first_name
args['middle_name'] = "sampleMiddleName"; // middle_name
args['last_name'] = "sampleLastName"; // last_name
args['music_player'] = "sampleMusicPlayer"; // music_player
args['software'] = "sampleSoftware"; // software
args['headphones'] = "sampleHeadphones"; // headphones
args['has_mixbank'] = false; // has_mixbank
swagger.Web.artistCreate(args, function(response) {
/* success callback */
console.log("Result of Web.artistCreate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistCreate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *name = @"sampleName"; // name
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *description = @"sampleDescription"; // description
NSString *origin = @"sampleOrigin"; // origin
NSNumber *tier = @-2147483648; // tier
NSString *yearsActive = @"sampleYearsActive"; // years_active
NSString *facebook = @"sampleFacebook"; // facebook
NSString *instagram = @"sampleInstagram"; // instagram
NSString *twitter = @"sampleTwitter"; // twitter
NSString *website = @"sampleWebsite"; // website
NSString *skId = @"sampleSkId"; // sk_id
NSString *skOnTourUntil = @"sampleSkOnTourUntil"; // sk_on_tour_until
NSString *skUri = @"sampleSkUri"; // sk_uri
NSString *managementContacts = @"sampleManagementContacts"; // management_contacts
NSString *youtube = @"sampleYoutube"; // youtube
NSString *itunesLink = @"sampleItunesLink"; // itunes_link
NSString *firstName = @"sampleFirstName"; // first_name
NSString *middleName = @"sampleMiddleName"; // middle_name
NSString *lastName = @"sampleLastName"; // last_name
NSString *musicPlayer = @"sampleMusicPlayer"; // music_player
NSString *software = @"sampleSoftware"; // software
NSString *headphones = @"sampleHeadphones"; // headphones
NSNumber *hasMixbank = @NO; // has_mixbank
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistCreateWithCompletionBlock:name
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
description:description
origin:origin
tier:tier
yearsActive:yearsActive
facebook:facebook
instagram:instagram
twitter:twitter
website:website
skId:skId
skOnTourUntil:skOnTourUntil
skUri:skUri
managementContacts:managementContacts
youtube:youtube
itunesLink:itunesLink
firstName:firstName
middleName:middleName
lastName:lastName
musicPlayer:musicPlayer
software:software
headphones:headphones
hasMixbank:hasMixbank
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$name = "sampleName"; // name
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$description = "sampleDescription"; // description
$origin = "sampleOrigin"; // origin
$tier = -2147483648; // tier
$yearsActive = "sampleYearsActive"; // years_active
$facebook = "sampleFacebook"; // facebook
$instagram = "sampleInstagram"; // instagram
$twitter = "sampleTwitter"; // twitter
$website = "sampleWebsite"; // website
$skId = "sampleSkId"; // sk_id
$skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
$skUri = "sampleSkUri"; // sk_uri
$managementContacts = "sampleManagementContacts"; // management_contacts
$youtube = "sampleYoutube"; // youtube
$itunesLink = "sampleItunesLink"; // itunes_link
$firstName = "sampleFirstName"; // first_name
$middleName = "sampleMiddleName"; // middle_name
$lastName = "sampleLastName"; // last_name
$musicPlayer = "sampleMusicPlayer"; // music_player
$software = "sampleSoftware"; // software
$headphones = "sampleHeadphones"; // headphones
$hasMixbank = False; // has_mixbank
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ArtistSerializer (model)
$response = $web_api->artistCreate($name, $metaTitle, $metaDescription, $slug, $description, $origin, $tier, $yearsActive, $facebook, $instagram, $twitter, $website, $skId, $skOnTourUntil, $skUri, $managementContacts, $youtube, $itunesLink, $firstName, $middleName, $lastName, $musicPlayer, $software, $headphones, $hasMixbank);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
name = "sample_name" # name
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ArtistSerializer (model)
response = web_api.artist_create(name, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False)
pprint(response)
# asynchronous call
# thread = web_api.artist_create(name, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
name = "sample_name" # name
begin
web_api = DjsApi::WebApi.new
# return ArtistSerializer (model)
response = web_api.artist_create(name, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :description => "sample_description", :origin => "sample_origin", :tier => -2147483648, :years_active => "sample_years_active", :facebook => "sample_facebook", :instagram => "sample_instagram", :twitter => "sample_twitter", :website => "sample_website", :sk_id => "sample_sk_id", :sk_on_tour_until => "sample_sk_on_tour_until", :sk_uri => "sample_sk_uri", :management_contacts => "sample_management_contacts", :youtube => "sample_youtube", :itunes_link => "sample_itunes_link", :first_name => "sample_first_name", :middle_name => "sample_middle_name", :last_name => "sample_last_name", :music_player => "sample_music_player", :software => "sample_software", :headphones => "sample_headphones", :has_mixbank => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val name = "sampleName" // name
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val description = "sampleDescription" // description
val origin = "sampleOrigin" // origin
val tier = -2147483648L // tier
val yearsActive = "sampleYearsActive" // years_active
val facebook = "sampleFacebook" // facebook
val instagram = "sampleInstagram" // instagram
val twitter = "sampleTwitter" // twitter
val website = "sampleWebsite" // website
val skId = "sampleSkId" // sk_id
val skOnTourUntil = "sampleSkOnTourUntil" // sk_on_tour_until
val skUri = "sampleSkUri" // sk_uri
val managementContacts = "sampleManagementContacts" // management_contacts
val youtube = "sampleYoutube" // youtube
val itunesLink = "sampleItunesLink" // itunes_link
val firstName = "sampleFirstName" // first_name
val middleName = "sampleMiddleName" // middle_name
val lastName = "sampleLastName" // last_name
val musicPlayer = "sampleMusicPlayer" // music_player
val software = "sampleSoftware" // software
val headphones = "sampleHeadphones" // headphones
val hasMixbank = false // has_mixbank
try {
val webApi = new WebApi
val response = webApi.artistCreate(name, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistCreateDj
Create a new artist
POST http://devcms.djs.com/api/artists/create-dj/
Create a new artist
| Name | Type | Location | Description | |
|---|---|---|---|---|
| name | String | HTTP Form | DJ Name of artist | |
| String | HTTP Form | Email of artist | ||
| password | String | HTTP Form | Password | |
| genre_ids | String | HTTP Form | CSV of internal genre slugs/keys to associate with the artist | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| description | String | HTTP Form | description | |
| origin | String | HTTP Form | origin | |
| tier | Integer (signed 64 bits) | HTTP Form | tier Minimum: -2147483648 Maximum: 2147483647 | |
| years_active | String | HTTP Form | years_active | |
| String | HTTP Form | |||
| String | HTTP Form | |||
| String | HTTP Form | |||
| website | String | HTTP Form | website | |
| sk_id | String | HTTP Form | sk_id | |
| sk_on_tour_until | String | HTTP Form | sk_on_tour_until | |
| sk_uri | String | HTTP Form | sk_uri | |
| management_contacts | String | HTTP Form | management_contacts | |
| youtube | String | HTTP Form | youtube | |
| itunes_link | String | HTTP Form | itunes_link | |
| first_name | String | HTTP Form | first_name | |
| middle_name | String | HTTP Form | middle_name | |
| last_name | String | HTTP Form | last_name | |
| music_player | String | HTTP Form | music_player | |
| software | String | HTTP Form | software | |
| headphones | String | HTTP Form | headphones | |
| has_mixbank | Boolean | HTTP Form | has_mixbank | |
| sound_cloud_id | String | HTTP Form | Soundcloud internal ID | |
| sound_cloud_url | String | HTTP Form | Soundcloud URL | |
| code | String | URL query string | Soundcloud auth code which will be converted to an access token and verified against the assigned DJ soundcloud profile (Required to verify users did not mockup hidden values) |
Request preview:
POST /api/artists/create-dj/?code=CODE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
description=DESCRIPTION&email=EMAIL&facebook=FACEBOOK&first_name=FIRST_NAME&genre_ids=GENRE_IDS&has_mixbank=HAS_MIXBANK&headphones=HEADPHONES&instagram=INSTAGRAM&itunes_link=ITUNES_LINK&last_name=LAST_NAME&management_contacts=MANAGEMENT_CONTACTS&meta_description=META_DESCRIPTION&meta_title=META_TITLE&middle_name=MIDDLE_NAME&music_player=MUSIC_PLAYER&name=NAME&origin=ORIGIN&password=PASSWORD&sk_id=SK_ID&sk_on_tour_until=SK_ON_TOUR_UNTIL&sk_uri=SK_URI&slug=SLUG&software=SOFTWARE&sound_cloud_id=SOUND_CLOUD_ID&sound_cloud_url=SOUND_CLOUD_URL&tier=-2147483648&twitter=TWITTER&website=WEBSITE&years_active=YEARS_ACTIVE&youtube=YOUTUBEThis endpoint returns ArtistChangeRecordSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var name: String = "sampleName"; // DJ Name of artist
var email: String = "sampleEmail"; // Email of artist
var password: String = "samplePassword"; // Password
var genreIds: String = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var description: String = "sampleDescription"; // description
var origin: String = "sampleOrigin"; // origin
var tier: Number = -2147483648; // tier
var yearsActive: String = "sampleYearsActive"; // years_active
var facebook: String = "sampleFacebook"; // facebook
var instagram: String = "sampleInstagram"; // instagram
var twitter: String = "sampleTwitter"; // twitter
var website: String = "sampleWebsite"; // website
var skId: String = "sampleSkId"; // sk_id
var skOnTourUntil: String = "sampleSkOnTourUntil"; // sk_on_tour_until
var skUri: String = "sampleSkUri"; // sk_uri
var managementContacts: String = "sampleManagementContacts"; // management_contacts
var youtube: String = "sampleYoutube"; // youtube
var itunesLink: String = "sampleItunesLink"; // itunes_link
var firstName: String = "sampleFirstName"; // first_name
var middleName: String = "sampleMiddleName"; // middle_name
var lastName: String = "sampleLastName"; // last_name
var musicPlayer: String = "sampleMusicPlayer"; // music_player
var software: String = "sampleSoftware"; // software
var headphones: String = "sampleHeadphones"; // headphones
var hasMixbank: Boolean = True; // has_mixbank
var soundCloudId: String = "sampleSoundCloudId"; // Soundcloud internal ID
var soundCloudUrl: String = "sampleSoundCloudUrl"; // Soundcloud URL
var code: String = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try
{
var webApi: WebApi = new WebApi();
var response: ArtistChangeRecordSerializer = webApi.artist_create_dj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
}
catch (e:Error)
{
trace(e)
}
String name = "sampleName"; // DJ Name of artist
String email = "sampleEmail"; // Email of artist
String password = "samplePassword"; // Password
String genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
String soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
String soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ArtistChangeRecordSerializer response = webApi.artistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/artists/create-dj/?code=<code>" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "name=<name>" \
-d "email=<email>" \
-d "password=<password>" \
-d "genre_ids=<genre_ids>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "description=<description>" \
-d "origin=<origin>" \
-d "tier=-2147483648" \
-d "years_active=<years_active>" \
-d "facebook=<facebook>" \
-d "instagram=<instagram>" \
-d "twitter=<twitter>" \
-d "website=<website>" \
-d "sk_id=<sk_id>" \
-d "sk_on_tour_until=<sk_on_tour_until>" \
-d "sk_uri=<sk_uri>" \
-d "management_contacts=<management_contacts>" \
-d "youtube=<youtube>" \
-d "itunes_link=<itunes_link>" \
-d "first_name=<first_name>" \
-d "middle_name=<middle_name>" \
-d "last_name=<last_name>" \
-d "music_player=<music_player>" \
-d "software=<software>" \
-d "headphones=<headphones>" \
-d "has_mixbank=<has_mixbank>" \
-d "sound_cloud_id=<sound_cloud_id>" \
-d "sound_cloud_url=<sound_cloud_url>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String name = "sampleName"; // DJ Name of artist
String email = "sampleEmail"; // Email of artist
String password = "samplePassword"; // Password
String genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
long? tier = -2147483648; // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
bool? hasMixbank = false; // has_mixbank
String soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
String soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistChangeRecordSerializer response = webApi.ArtistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String name = "sampleName"; // DJ Name of artist
String email = "sampleEmail"; // Email of artist
String password = "samplePassword"; // Password
String genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
String soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
String soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
String code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
WebApi webApi = new WebApi();
ArtistChangeRecordSerializer response = webApi.artistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['name'] = "sampleName"; // DJ Name of artist
args['email'] = "sampleEmail"; // Email of artist
args['password'] = "samplePassword"; // Password
args['genre_ids'] = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['description'] = "sampleDescription"; // description
args['origin'] = "sampleOrigin"; // origin
args['tier'] = -2147483648; // tier
args['years_active'] = "sampleYearsActive"; // years_active
args['facebook'] = "sampleFacebook"; // facebook
args['instagram'] = "sampleInstagram"; // instagram
args['twitter'] = "sampleTwitter"; // twitter
args['website'] = "sampleWebsite"; // website
args['sk_id'] = "sampleSkId"; // sk_id
args['sk_on_tour_until'] = "sampleSkOnTourUntil"; // sk_on_tour_until
args['sk_uri'] = "sampleSkUri"; // sk_uri
args['management_contacts'] = "sampleManagementContacts"; // management_contacts
args['youtube'] = "sampleYoutube"; // youtube
args['itunes_link'] = "sampleItunesLink"; // itunes_link
args['first_name'] = "sampleFirstName"; // first_name
args['middle_name'] = "sampleMiddleName"; // middle_name
args['last_name'] = "sampleLastName"; // last_name
args['music_player'] = "sampleMusicPlayer"; // music_player
args['software'] = "sampleSoftware"; // software
args['headphones'] = "sampleHeadphones"; // headphones
args['has_mixbank'] = false; // has_mixbank
args['sound_cloud_id'] = "sampleSoundCloudId"; // Soundcloud internal ID
args['sound_cloud_url'] = "sampleSoundCloudUrl"; // Soundcloud URL
args['code'] = "sampleCode"; // Soundcloud auth code which will be converted to an access...
swagger.Web.artistCreateDj(args, function(response) {
/* success callback */
console.log("Result of Web.artistCreateDj");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistCreateDj:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *name = @"sampleName"; // DJ Name of artist
NSString *email = @"sampleEmail"; // Email of artist
NSString *password = @"samplePassword"; // Password
NSString *genreIds = @"sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *description = @"sampleDescription"; // description
NSString *origin = @"sampleOrigin"; // origin
NSNumber *tier = @-2147483648; // tier
NSString *yearsActive = @"sampleYearsActive"; // years_active
NSString *facebook = @"sampleFacebook"; // facebook
NSString *instagram = @"sampleInstagram"; // instagram
NSString *twitter = @"sampleTwitter"; // twitter
NSString *website = @"sampleWebsite"; // website
NSString *skId = @"sampleSkId"; // sk_id
NSString *skOnTourUntil = @"sampleSkOnTourUntil"; // sk_on_tour_until
NSString *skUri = @"sampleSkUri"; // sk_uri
NSString *managementContacts = @"sampleManagementContacts"; // management_contacts
NSString *youtube = @"sampleYoutube"; // youtube
NSString *itunesLink = @"sampleItunesLink"; // itunes_link
NSString *firstName = @"sampleFirstName"; // first_name
NSString *middleName = @"sampleMiddleName"; // middle_name
NSString *lastName = @"sampleLastName"; // last_name
NSString *musicPlayer = @"sampleMusicPlayer"; // music_player
NSString *software = @"sampleSoftware"; // software
NSString *headphones = @"sampleHeadphones"; // headphones
NSNumber *hasMixbank = @NO; // has_mixbank
NSString *soundCloudId = @"sampleSoundCloudId"; // Soundcloud internal ID
NSString *soundCloudUrl = @"sampleSoundCloudUrl"; // Soundcloud URL
NSString *code = @"sampleCode"; // Soundcloud auth code which will be converted to an access...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistCreateDjWithCompletionBlock:name
email:email
password:password
genreIds:genreIds
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
description:description
origin:origin
tier:tier
yearsActive:yearsActive
facebook:facebook
instagram:instagram
twitter:twitter
website:website
skId:skId
skOnTourUntil:skOnTourUntil
skUri:skUri
managementContacts:managementContacts
youtube:youtube
itunesLink:itunesLink
firstName:firstName
middleName:middleName
lastName:lastName
musicPlayer:musicPlayer
software:software
headphones:headphones
hasMixbank:hasMixbank
soundCloudId:soundCloudId
soundCloudUrl:soundCloudUrl
code:code
completionHandler:^(SWGArtistChangeRecordSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$name = "sampleName"; // DJ Name of artist
$email = "sampleEmail"; // Email of artist
$password = "samplePassword"; // Password
$genreIds = "sampleGenreIds"; // CSV of internal genre slugs/keys to associate with the...
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$description = "sampleDescription"; // description
$origin = "sampleOrigin"; // origin
$tier = -2147483648; // tier
$yearsActive = "sampleYearsActive"; // years_active
$facebook = "sampleFacebook"; // facebook
$instagram = "sampleInstagram"; // instagram
$twitter = "sampleTwitter"; // twitter
$website = "sampleWebsite"; // website
$skId = "sampleSkId"; // sk_id
$skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
$skUri = "sampleSkUri"; // sk_uri
$managementContacts = "sampleManagementContacts"; // management_contacts
$youtube = "sampleYoutube"; // youtube
$itunesLink = "sampleItunesLink"; // itunes_link
$firstName = "sampleFirstName"; // first_name
$middleName = "sampleMiddleName"; // middle_name
$lastName = "sampleLastName"; // last_name
$musicPlayer = "sampleMusicPlayer"; // music_player
$software = "sampleSoftware"; // software
$headphones = "sampleHeadphones"; // headphones
$hasMixbank = False; // has_mixbank
$soundCloudId = "sampleSoundCloudId"; // Soundcloud internal ID
$soundCloudUrl = "sampleSoundCloudUrl"; // Soundcloud URL
$code = "sampleCode"; // Soundcloud auth code which will be converted to an access...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ArtistChangeRecordSerializer (model)
$response = $web_api->artistCreateDj($name, $email, $password, $genreIds, $metaTitle, $metaDescription, $slug, $description, $origin, $tier, $yearsActive, $facebook, $instagram, $twitter, $website, $skId, $skOnTourUntil, $skUri, $managementContacts, $youtube, $itunesLink, $firstName, $middleName, $lastName, $musicPlayer, $software, $headphones, $hasMixbank, $soundCloudId, $soundCloudUrl, $code);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
name = "sample_name" # DJ Name of artist
email = "sample_email" # Email of artist
password = "sample_password" # Password
genre_ids = "sample_genre_ids" # CSV of internal genre slugs/keys to associate with the...
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ArtistChangeRecordSerializer (model)
response = web_api.artist_create_dj(name, email, password, genre_ids, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, sound_cloud_id="sample_sound_cloud_id", sound_cloud_url="sample_sound_cloud_url", code="sample_code")
pprint(response)
# asynchronous call
# thread = web_api.artist_create_dj(name, email, password, genre_ids, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, sound_cloud_id="sample_sound_cloud_id", sound_cloud_url="sample_sound_cloud_url", code="sample_code", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
name = "sample_name" # DJ Name of artist
email = "sample_email" # Email of artist
password = "sample_password" # Password
genre_ids = "sample_genre_ids" # CSV of internal genre slugs/keys to associate with the...
begin
web_api = DjsApi::WebApi.new
# return ArtistChangeRecordSerializer (model)
response = web_api.artist_create_dj(name, email, password, genre_ids, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :description => "sample_description", :origin => "sample_origin", :tier => -2147483648, :years_active => "sample_years_active", :facebook => "sample_facebook", :instagram => "sample_instagram", :twitter => "sample_twitter", :website => "sample_website", :sk_id => "sample_sk_id", :sk_on_tour_until => "sample_sk_on_tour_until", :sk_uri => "sample_sk_uri", :management_contacts => "sample_management_contacts", :youtube => "sample_youtube", :itunes_link => "sample_itunes_link", :first_name => "sample_first_name", :middle_name => "sample_middle_name", :last_name => "sample_last_name", :music_player => "sample_music_player", :software => "sample_software", :headphones => "sample_headphones", :has_mixbank => false, :sound_cloud_id => "sample_sound_cloud_id", :sound_cloud_url => "sample_sound_cloud_url", :code => "sample_code")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val name = "sampleName" // DJ Name of artist
val email = "sampleEmail" // Email of artist
val password = "samplePassword" // Password
val genreIds = "sampleGenreIds" // CSV of internal genre slugs/keys to associate with the...
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val description = "sampleDescription" // description
val origin = "sampleOrigin" // origin
val tier = -2147483648L // tier
val yearsActive = "sampleYearsActive" // years_active
val facebook = "sampleFacebook" // facebook
val instagram = "sampleInstagram" // instagram
val twitter = "sampleTwitter" // twitter
val website = "sampleWebsite" // website
val skId = "sampleSkId" // sk_id
val skOnTourUntil = "sampleSkOnTourUntil" // sk_on_tour_until
val skUri = "sampleSkUri" // sk_uri
val managementContacts = "sampleManagementContacts" // management_contacts
val youtube = "sampleYoutube" // youtube
val itunesLink = "sampleItunesLink" // itunes_link
val firstName = "sampleFirstName" // first_name
val middleName = "sampleMiddleName" // middle_name
val lastName = "sampleLastName" // last_name
val musicPlayer = "sampleMusicPlayer" // music_player
val software = "sampleSoftware" // software
val headphones = "sampleHeadphones" // headphones
val hasMixbank = false // has_mixbank
val soundCloudId = "sampleSoundCloudId" // Soundcloud internal ID
val soundCloudUrl = "sampleSoundCloudUrl" // Soundcloud URL
val code = "sampleCode" // Soundcloud auth code which will be converted to an access...
try {
val webApi = new WebApi
val response = webApi.artistCreateDj(name, email, password, genreIds, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank, soundCloudId, soundCloudUrl, code)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistFinishClaim
After authenticating and getting back an access token from soundcloud
POST http://devcms.djs.com/api/artists/:pk/finish-claim/
After authenticating and getting back an access token from soundcloud. Update the login email and password
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| name | String | HTTP Form | name | |
| String | HTTP Form | New dj email | ||
| password | String | HTTP Form | New dj password | |
| access_token | String | HTTP Form | Soundcloud access token given back to you on first claim response | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| description | String | HTTP Form | description | |
| origin | String | HTTP Form | origin | |
| tier | Integer (signed 64 bits) | HTTP Form | tier Minimum: -2147483648 Maximum: 2147483647 | |
| years_active | String | HTTP Form | years_active | |
| String | HTTP Form | |||
| String | HTTP Form | |||
| String | HTTP Form | |||
| website | String | HTTP Form | website | |
| sk_id | String | HTTP Form | sk_id | |
| sk_on_tour_until | String | HTTP Form | sk_on_tour_until | |
| sk_uri | String | HTTP Form | sk_uri | |
| management_contacts | String | HTTP Form | management_contacts | |
| youtube | String | HTTP Form | youtube | |
| itunes_link | String | HTTP Form | itunes_link | |
| first_name | String | HTTP Form | first_name | |
| middle_name | String | HTTP Form | middle_name | |
| last_name | String | HTTP Form | last_name | |
| music_player | String | HTTP Form | music_player | |
| software | String | HTTP Form | software | |
| headphones | String | HTTP Form | headphones | |
| has_mixbank | Boolean | HTTP Form | has_mixbank |
Request preview:
POST /api/artists/PK/finish-claim/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
access_token=ACCESS_TOKEN&description=DESCRIPTION&email=EMAIL&facebook=FACEBOOK&first_name=FIRST_NAME&has_mixbank=HAS_MIXBANK&headphones=HEADPHONES&instagram=INSTAGRAM&itunes_link=ITUNES_LINK&last_name=LAST_NAME&management_contacts=MANAGEMENT_CONTACTS&meta_description=META_DESCRIPTION&meta_title=META_TITLE&middle_name=MIDDLE_NAME&music_player=MUSIC_PLAYER&name=NAME&origin=ORIGIN&password=PASSWORD&sk_id=SK_ID&sk_on_tour_until=SK_ON_TOUR_UNTIL&sk_uri=SK_URI&slug=SLUG&software=SOFTWARE&tier=-2147483648&twitter=TWITTER&website=WEBSITE&years_active=YEARS_ACTIVE&youtube=YOUTUBEThis endpoint returns SuccessAndErrorSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| 501 | You must be logged in as the appropriate soundcloud user 'xxx' |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var name: String = "sampleName"; // name
var email: String = "sampleEmail"; // New dj email
var password: String = "samplePassword"; // New dj password
var accessToken: String = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var description: String = "sampleDescription"; // description
var origin: String = "sampleOrigin"; // origin
var tier: Number = -2147483648; // tier
var yearsActive: String = "sampleYearsActive"; // years_active
var facebook: String = "sampleFacebook"; // facebook
var instagram: String = "sampleInstagram"; // instagram
var twitter: String = "sampleTwitter"; // twitter
var website: String = "sampleWebsite"; // website
var skId: String = "sampleSkId"; // sk_id
var skOnTourUntil: String = "sampleSkOnTourUntil"; // sk_on_tour_until
var skUri: String = "sampleSkUri"; // sk_uri
var managementContacts: String = "sampleManagementContacts"; // management_contacts
var youtube: String = "sampleYoutube"; // youtube
var itunesLink: String = "sampleItunesLink"; // itunes_link
var firstName: String = "sampleFirstName"; // first_name
var middleName: String = "sampleMiddleName"; // middle_name
var lastName: String = "sampleLastName"; // last_name
var musicPlayer: String = "sampleMusicPlayer"; // music_player
var software: String = "sampleSoftware"; // software
var headphones: String = "sampleHeadphones"; // headphones
var hasMixbank: Boolean = True; // has_mixbank
try
{
var webApi: WebApi = new WebApi();
var response: SuccessAndErrorSerializer = webApi.artist_finish_claim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String name = "sampleName"; // name
String email = "sampleEmail"; // New dj email
String password = "samplePassword"; // New dj password
String accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
SuccessAndErrorSerializer response = webApi.artistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/artists/<pk>/finish-claim/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "name=<name>" \
-d "email=<email>" \
-d "password=<password>" \
-d "access_token=<access_token>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "description=<description>" \
-d "origin=<origin>" \
-d "tier=-2147483648" \
-d "years_active=<years_active>" \
-d "facebook=<facebook>" \
-d "instagram=<instagram>" \
-d "twitter=<twitter>" \
-d "website=<website>" \
-d "sk_id=<sk_id>" \
-d "sk_on_tour_until=<sk_on_tour_until>" \
-d "sk_uri=<sk_uri>" \
-d "management_contacts=<management_contacts>" \
-d "youtube=<youtube>" \
-d "itunes_link=<itunes_link>" \
-d "first_name=<first_name>" \
-d "middle_name=<middle_name>" \
-d "last_name=<last_name>" \
-d "music_player=<music_player>" \
-d "software=<software>" \
-d "headphones=<headphones>" \
-d "has_mixbank=<has_mixbank>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String name = "sampleName"; // name
String email = "sampleEmail"; // New dj email
String password = "samplePassword"; // New dj password
String accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
long? tier = -2147483648; // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
bool? hasMixbank = false; // has_mixbank
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessAndErrorSerializer response = webApi.ArtistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String name = "sampleName"; // name
String email = "sampleEmail"; // New dj email
String password = "samplePassword"; // New dj password
String accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String description = "sampleDescription"; // description
String origin = "sampleOrigin"; // origin
Long tier = new Long(-2147483648); // tier
String yearsActive = "sampleYearsActive"; // years_active
String facebook = "sampleFacebook"; // facebook
String instagram = "sampleInstagram"; // instagram
String twitter = "sampleTwitter"; // twitter
String website = "sampleWebsite"; // website
String skId = "sampleSkId"; // sk_id
String skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
String skUri = "sampleSkUri"; // sk_uri
String managementContacts = "sampleManagementContacts"; // management_contacts
String youtube = "sampleYoutube"; // youtube
String itunesLink = "sampleItunesLink"; // itunes_link
String firstName = "sampleFirstName"; // first_name
String middleName = "sampleMiddleName"; // middle_name
String lastName = "sampleLastName"; // last_name
String musicPlayer = "sampleMusicPlayer"; // music_player
String software = "sampleSoftware"; // software
String headphones = "sampleHeadphones"; // headphones
Boolean hasMixbank = false; // has_mixbank
try {
WebApi webApi = new WebApi();
SuccessAndErrorSerializer response = webApi.artistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['name'] = "sampleName"; // name
args['email'] = "sampleEmail"; // New dj email
args['password'] = "samplePassword"; // New dj password
args['access_token'] = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['description'] = "sampleDescription"; // description
args['origin'] = "sampleOrigin"; // origin
args['tier'] = -2147483648; // tier
args['years_active'] = "sampleYearsActive"; // years_active
args['facebook'] = "sampleFacebook"; // facebook
args['instagram'] = "sampleInstagram"; // instagram
args['twitter'] = "sampleTwitter"; // twitter
args['website'] = "sampleWebsite"; // website
args['sk_id'] = "sampleSkId"; // sk_id
args['sk_on_tour_until'] = "sampleSkOnTourUntil"; // sk_on_tour_until
args['sk_uri'] = "sampleSkUri"; // sk_uri
args['management_contacts'] = "sampleManagementContacts"; // management_contacts
args['youtube'] = "sampleYoutube"; // youtube
args['itunes_link'] = "sampleItunesLink"; // itunes_link
args['first_name'] = "sampleFirstName"; // first_name
args['middle_name'] = "sampleMiddleName"; // middle_name
args['last_name'] = "sampleLastName"; // last_name
args['music_player'] = "sampleMusicPlayer"; // music_player
args['software'] = "sampleSoftware"; // software
args['headphones'] = "sampleHeadphones"; // headphones
args['has_mixbank'] = false; // has_mixbank
swagger.Web.artistFinishClaim(args, function(response) {
/* success callback */
console.log("Result of Web.artistFinishClaim");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistFinishClaim:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *name = @"sampleName"; // name
NSString *email = @"sampleEmail"; // New dj email
NSString *password = @"samplePassword"; // New dj password
NSString *accessToken = @"sampleAccessToken"; // Soundcloud access token given back to you on first claim...
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *description = @"sampleDescription"; // description
NSString *origin = @"sampleOrigin"; // origin
NSNumber *tier = @-2147483648; // tier
NSString *yearsActive = @"sampleYearsActive"; // years_active
NSString *facebook = @"sampleFacebook"; // facebook
NSString *instagram = @"sampleInstagram"; // instagram
NSString *twitter = @"sampleTwitter"; // twitter
NSString *website = @"sampleWebsite"; // website
NSString *skId = @"sampleSkId"; // sk_id
NSString *skOnTourUntil = @"sampleSkOnTourUntil"; // sk_on_tour_until
NSString *skUri = @"sampleSkUri"; // sk_uri
NSString *managementContacts = @"sampleManagementContacts"; // management_contacts
NSString *youtube = @"sampleYoutube"; // youtube
NSString *itunesLink = @"sampleItunesLink"; // itunes_link
NSString *firstName = @"sampleFirstName"; // first_name
NSString *middleName = @"sampleMiddleName"; // middle_name
NSString *lastName = @"sampleLastName"; // last_name
NSString *musicPlayer = @"sampleMusicPlayer"; // music_player
NSString *software = @"sampleSoftware"; // software
NSString *headphones = @"sampleHeadphones"; // headphones
NSNumber *hasMixbank = @NO; // has_mixbank
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistFinishClaimWithCompletionBlock:pk
name:name
email:email
password:password
accessToken:accessToken
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
description:description
origin:origin
tier:tier
yearsActive:yearsActive
facebook:facebook
instagram:instagram
twitter:twitter
website:website
skId:skId
skOnTourUntil:skOnTourUntil
skUri:skUri
managementContacts:managementContacts
youtube:youtube
itunesLink:itunesLink
firstName:firstName
middleName:middleName
lastName:lastName
musicPlayer:musicPlayer
software:software
headphones:headphones
hasMixbank:hasMixbank
completionHandler:^(SWGSuccessAndErrorSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$name = "sampleName"; // name
$email = "sampleEmail"; // New dj email
$password = "samplePassword"; // New dj password
$accessToken = "sampleAccessToken"; // Soundcloud access token given back to you on first claim...
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$description = "sampleDescription"; // description
$origin = "sampleOrigin"; // origin
$tier = -2147483648; // tier
$yearsActive = "sampleYearsActive"; // years_active
$facebook = "sampleFacebook"; // facebook
$instagram = "sampleInstagram"; // instagram
$twitter = "sampleTwitter"; // twitter
$website = "sampleWebsite"; // website
$skId = "sampleSkId"; // sk_id
$skOnTourUntil = "sampleSkOnTourUntil"; // sk_on_tour_until
$skUri = "sampleSkUri"; // sk_uri
$managementContacts = "sampleManagementContacts"; // management_contacts
$youtube = "sampleYoutube"; // youtube
$itunesLink = "sampleItunesLink"; // itunes_link
$firstName = "sampleFirstName"; // first_name
$middleName = "sampleMiddleName"; // middle_name
$lastName = "sampleLastName"; // last_name
$musicPlayer = "sampleMusicPlayer"; // music_player
$software = "sampleSoftware"; // software
$headphones = "sampleHeadphones"; // headphones
$hasMixbank = False; // has_mixbank
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessAndErrorSerializer (model)
$response = $web_api->artistFinishClaim($pk, $name, $email, $password, $accessToken, $metaTitle, $metaDescription, $slug, $description, $origin, $tier, $yearsActive, $facebook, $instagram, $twitter, $website, $skId, $skOnTourUntil, $skUri, $managementContacts, $youtube, $itunesLink, $firstName, $middleName, $lastName, $musicPlayer, $software, $headphones, $hasMixbank);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
name = "sample_name" # name
email = "sample_email" # New dj email
password = "sample_password" # New dj password
access_token = "sample_access_token" # Soundcloud access token given back to you on first claim...
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessAndErrorSerializer (model)
response = web_api.artist_finish_claim(pk, name, email, password, access_token, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False)
pprint(response)
# asynchronous call
# thread = web_api.artist_finish_claim(pk, name, email, password, access_token, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", description="sample_description", origin="sample_origin", tier=-2147483648, years_active="sample_years_active", facebook="sample_facebook", instagram="sample_instagram", twitter="sample_twitter", website="sample_website", sk_id="sample_sk_id", sk_on_tour_until="sample_sk_on_tour_until", sk_uri="sample_sk_uri", management_contacts="sample_management_contacts", youtube="sample_youtube", itunes_link="sample_itunes_link", first_name="sample_first_name", middle_name="sample_middle_name", last_name="sample_last_name", music_player="sample_music_player", software="sample_software", headphones="sample_headphones", has_mixbank=False, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
name = "sample_name" # name
email = "sample_email" # New dj email
password = "sample_password" # New dj password
access_token = "sample_access_token" # Soundcloud access token given back to you on first claim...
begin
web_api = DjsApi::WebApi.new
# return SuccessAndErrorSerializer (model)
response = web_api.artist_finish_claim(pk, name, email, password, access_token, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :description => "sample_description", :origin => "sample_origin", :tier => -2147483648, :years_active => "sample_years_active", :facebook => "sample_facebook", :instagram => "sample_instagram", :twitter => "sample_twitter", :website => "sample_website", :sk_id => "sample_sk_id", :sk_on_tour_until => "sample_sk_on_tour_until", :sk_uri => "sample_sk_uri", :management_contacts => "sample_management_contacts", :youtube => "sample_youtube", :itunes_link => "sample_itunes_link", :first_name => "sample_first_name", :middle_name => "sample_middle_name", :last_name => "sample_last_name", :music_player => "sample_music_player", :software => "sample_software", :headphones => "sample_headphones", :has_mixbank => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val name = "sampleName" // name
val email = "sampleEmail" // New dj email
val password = "samplePassword" // New dj password
val accessToken = "sampleAccessToken" // Soundcloud access token given back to you on first claim...
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val description = "sampleDescription" // description
val origin = "sampleOrigin" // origin
val tier = -2147483648L // tier
val yearsActive = "sampleYearsActive" // years_active
val facebook = "sampleFacebook" // facebook
val instagram = "sampleInstagram" // instagram
val twitter = "sampleTwitter" // twitter
val website = "sampleWebsite" // website
val skId = "sampleSkId" // sk_id
val skOnTourUntil = "sampleSkOnTourUntil" // sk_on_tour_until
val skUri = "sampleSkUri" // sk_uri
val managementContacts = "sampleManagementContacts" // management_contacts
val youtube = "sampleYoutube" // youtube
val itunesLink = "sampleItunesLink" // itunes_link
val firstName = "sampleFirstName" // first_name
val middleName = "sampleMiddleName" // middle_name
val lastName = "sampleLastName" // last_name
val musicPlayer = "sampleMusicPlayer" // music_player
val software = "sampleSoftware" // software
val headphones = "sampleHeadphones" // headphones
val hasMixbank = false // has_mixbank
try {
val webApi = new WebApi
val response = webApi.artistFinishClaim(pk, name, email, password, accessToken, metaTitle, metaDescription, slug, description, origin, tier, yearsActive, facebook, instagram, twitter, website, skId, skOnTourUntil, skUri, managementContacts, youtube, itunesLink, firstName, middleName, lastName, musicPlayer, software, headphones, hasMixbank)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistFollow
Follow an artist with current logged in user
GET http://devcms.djs.com/api/artists/:pk/follow/
Follow an artist with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/artists/PK/follow/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns ArtistSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: ArtistSerializer = webApi.artist_follow(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistFollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/artists/<pk>/follow/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistFollow(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistFollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.artistFollow(args, function(response) {
/* success callback */
console.log("Result of Web.artistFollow");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistFollow:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistFollowWithCompletionBlock:pk
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ArtistSerializer (model)
$response = $web_api->artistFollow($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ArtistSerializer (model)
response = web_api.artist_follow(pk)
pprint(response)
# asynchronous call
# thread = web_api.artist_follow(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ArtistSerializer (model)
response = web_api.artist_follow(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.artistFollow(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistList
List all Artists
GET http://devcms.djs.com/api/artists/
List all Artists
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| genres__key | String | URL query string | Filter artists by genre key | |
| tier | String | URL query string | Filter by artist tier | |
| with_events | String | URL query string | Fetch related Dj events. Into the a new "events" index. | |
| event_page | String | URL query string | Paginate through more events by increasing by one. Starting at index of 2 because you get your first page on initial "with_events" request | |
| with_tracks | String | URL query string | Fetch 10 related Dj tracks. Into the a new "tracks" index. | |
| track_page | String | URL query string | Paginate through more tracks by increasing by one. Starting at index of 2 because you get your first page on initial "with_tracks" request | |
| with_featured_tracks | String | URL query string | Fetch featured Dj tracks. Into the a new "with_featured_tracks" index. | |
| featured_track_page | String | URL query string | Paginate through more tracks by increasing by one. Starting at index of 2 because you get your first page on initial "with_featured_tracks" request | |
| event_per_page | String | URL query string | How many per page you would like (Default is 20 events) | |
| featured_track_per_page | String | URL query string | How many per page you would like (Default is 3 featured tracks) | |
| track_per_page | String | URL query string | How many per page you would like (Default is 9 featured tracks) | |
| with_followers | String | URL query string | Fetch favorites the "followers" index. | |
| followers_page | String | URL query string | Paginate through more follower users by increasing by one. Starting at index of 2 because you get your first page on initial "with_followers" request | |
| followers_per_page | String | URL query string | How many per page you would like (Default is 16 followers) | |
| with_following | String | URL query string | Fetch favorites the "following" index. | |
| following_page | String | URL query string | Paginate through more following djs by increasing by one. Starting at index of 2 because you get your first page on initial "with_following" request | |
| following_per_page | String | URL query string | How many per page you would like (Default is 16 following) | |
| with_following_users | String | URL query string | Fetch favorites the "following_users" index. | |
| following_users_page | String | URL query string | Paginate through more following users by increasing by one. Starting at index of 2 because you get your first page on initial "with_following_users" request | |
| following_users_per_page | String | URL query string | How many per page you would like (Default is 16 following) |
Request preview:
GET /api/artists/?page=PAGE&only_fields=ONLY_FIELDS&per_page=PER_PAGE&ordering=ORDERING&genres__key=GENRES__KEY&tier=TIER&with_events=WITH_EVENTS&event_page=EVENT_PAGE&with_tracks=WITH_TRACKS&track_page=TRACK_PAGE&with_featured_tracks=WITH_FEATURED_TRACKS&featured_track_page=FEATURED_TRACK_PAGE&event_per_page=EVENT_PER_PAGE&featured_track_per_page=FEATURED_TRACK_PER_PAGE&track_per_page=TRACK_PER_PAGE&with_followers=WITH_FOLLOWERS&followers_page=FOLLOWERS_PAGE&followers_per_page=FOLLOWERS_PER_PAGE&with_following=WITH_FOLLOWING&following_page=FOLLOWING_PAGE&following_per_page=FOLLOWING_PER_PAGE&with_following_users=WITH_FOLLOWING_USERS&following_users_page=FOLLOWING_USERS_PAGE&following_users_per_page=FOLLOWING_USERS_PER_PAGE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns ArtistPaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var genresKey: String = "sampleGenresKey"; // Filter artists by genre key
var tier: String = "sampleTier"; // Filter by artist tier
var withEvents: String = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
var eventPage: String = "sampleEventPage"; // Paginate through more events by increasing by one. ...
var withTracks: String = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
var trackPage: String = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
var withFeaturedTracks: String = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
var featuredTrackPage: String = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
var eventPerPage: String = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
var featuredTrackPerPage: String = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
var trackPerPage: String = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
var withFollowers: String = "sampleWithFollowers"; // Fetch favorites the "followers" index.
var followersPage: String = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
var followersPerPage: String = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
var withFollowing: String = "sampleWithFollowing"; // Fetch favorites the "following" index.
var followingPage: String = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
var followingPerPage: String = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
var withFollowingUsers: String = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
var followingUsersPage: String = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
var followingUsersPerPage: String = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try
{
var webApi: WebApi = new WebApi();
var response: ArtistPaginationSerializer = webApi.artist_list(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String genresKey = "sampleGenresKey"; // Filter artists by genre key
String tier = "sampleTier"; // Filter by artist tier
String withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try {
WebApi webApi = new WebApi();
ArtistPaginationSerializer response = webApi.artistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/artists/?page=<page>&only_fields=<only_fields>&per_page=<per_page>&ordering=<ordering>&genres__key=<genres__key>&tier=<tier>&with_events=<with_events>&event_page=<event_page>&with_tracks=<with_tracks>&track_page=<track_page>&with_featured_tracks=<with_featured_tracks>&featured_track_page=<featured_track_page>&event_per_page=<event_per_page>&featured_track_per_page=<featured_track_per_page>&track_per_page=<track_per_page>&with_followers=<with_followers>&followers_page=<followers_page>&followers_per_page=<followers_per_page>&with_following=<with_following>&following_page=<following_page>&following_per_page=<following_per_page>&with_following_users=<with_following_users>&following_users_page=<following_users_page>&following_users_per_page=<following_users_per_page>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String genresKey = "sampleGenresKey"; // Filter artists by genre key
String tier = "sampleTier"; // Filter by artist tier
String withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistPaginationSerializer response = webApi.ArtistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String genresKey = "sampleGenresKey"; // Filter artists by genre key
String tier = "sampleTier"; // Filter by artist tier
String withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try {
WebApi webApi = new WebApi();
ArtistPaginationSerializer response = webApi.artistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['genres__key'] = "sampleGenresKey"; // Filter artists by genre key
args['tier'] = "sampleTier"; // Filter by artist tier
args['with_events'] = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_tracks'] = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
args['track_page'] = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
args['with_featured_tracks'] = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
args['featured_track_page'] = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
args['featured_track_per_page'] = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
args['track_per_page'] = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_following'] = "sampleWithFollowing"; // Fetch favorites the "following" index.
args['following_page'] = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
args['following_per_page'] = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
args['with_following_users'] = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
args['following_users_page'] = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
args['following_users_per_page'] = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
swagger.Web.artistList(args, function(response) {
/* success callback */
console.log("Result of Web.artistList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *genresKey = @"sampleGenresKey"; // Filter artists by genre key
NSString *tier = @"sampleTier"; // Filter by artist tier
NSString *withEvents = @"sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withTracks = @"sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
NSString *trackPage = @"sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *withFeaturedTracks = @"sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
NSString *featuredTrackPage = @"sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 20 events)
NSString *featuredTrackPerPage = @"sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
NSString *trackPerPage = @"sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withFollowing = @"sampleWithFollowing"; // Fetch favorites the "following" index.
NSString *followingPage = @"sampleFollowingPage"; // Paginate through more following djs by increasing by one....
NSString *followingPerPage = @"sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowingUsers = @"sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
NSString *followingUsersPage = @"sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
NSString *followingUsersPerPage = @"sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
genresKey:genresKey
tier:tier
withEvents:withEvents
eventPage:eventPage
withTracks:withTracks
trackPage:trackPage
withFeaturedTracks:withFeaturedTracks
featuredTrackPage:featuredTrackPage
eventPerPage:eventPerPage
featuredTrackPerPage:featuredTrackPerPage
trackPerPage:trackPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withFollowing:withFollowing
followingPage:followingPage
followingPerPage:followingPerPage
withFollowingUsers:withFollowingUsers
followingUsersPage:followingUsersPage
followingUsersPerPage:followingUsersPerPage
completionHandler:^(SWGArtistPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$genresKey = "sampleGenresKey"; // Filter artists by genre key
$tier = "sampleTier"; // Filter by artist tier
$withEvents = "sampleWithEvents"; // Fetch related Dj events. Into the a new "events" index.
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withTracks = "sampleWithTracks"; // Fetch 10 related Dj tracks. Into the a new "tracks" index.
$trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
$withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch featured Dj tracks. Into the a new...
$featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
$featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
$trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
$followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
$followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
$withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
$followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
$followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ArtistPaginationSerializer (model)
$response = $web_api->artistList($page, $onlyFields, $perPage, $ordering, $genresKey, $tier, $withEvents, $eventPage, $withTracks, $trackPage, $withFeaturedTracks, $featuredTrackPage, $eventPerPage, $featuredTrackPerPage, $trackPerPage, $withFollowers, $followersPage, $followersPerPage, $withFollowing, $followingPage, $followingPerPage, $withFollowingUsers, $followingUsersPage, $followingUsersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ArtistPaginationSerializer (model)
response = web_api.artist_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", genres__key="sample_genres__key", tier="sample_tier", with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page")
pprint(response)
# asynchronous call
# thread = web_api.artist_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", genres__key="sample_genres__key", tier="sample_tier", with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return ArtistPaginationSerializer (model)
response = web_api.artist_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :genres__key => "sample_genres__key", :tier => "sample_tier", :with_events => "sample_with_events", :event_page => "sample_event_page", :with_tracks => "sample_with_tracks", :track_page => "sample_track_page", :with_featured_tracks => "sample_with_featured_tracks", :featured_track_page => "sample_featured_track_page", :event_per_page => "sample_event_per_page", :featured_track_per_page => "sample_featured_track_per_page", :track_per_page => "sample_track_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_following => "sample_with_following", :following_page => "sample_following_page", :following_per_page => "sample_following_per_page", :with_following_users => "sample_with_following_users", :following_users_page => "sample_following_users_page", :following_users_per_page => "sample_following_users_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val genresKey = "sampleGenresKey" // Filter artists by genre key
val tier = "sampleTier" // Filter by artist tier
val withEvents = "sampleWithEvents" // Fetch related Dj events. Into the a new "events" index.
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withTracks = "sampleWithTracks" // Fetch 10 related Dj tracks. Into the a new "tracks" index.
val trackPage = "sampleTrackPage" // Paginate through more tracks by increasing by one. ...
val withFeaturedTracks = "sampleWithFeaturedTracks" // Fetch featured Dj tracks. Into the a new...
val featuredTrackPage = "sampleFeaturedTrackPage" // Paginate through more tracks by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 20 events)
val featuredTrackPerPage = "sampleFeaturedTrackPerPage" // How many per page you would like (Default is 3 featured...
val trackPerPage = "sampleTrackPerPage" // How many per page you would like (Default is 9 featured...
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withFollowing = "sampleWithFollowing" // Fetch favorites the "following" index.
val followingPage = "sampleFollowingPage" // Paginate through more following djs by increasing by one....
val followingPerPage = "sampleFollowingPerPage" // How many per page you would like (Default is 16 following)
val withFollowingUsers = "sampleWithFollowingUsers" // Fetch favorites the "following_users" index.
val followingUsersPage = "sampleFollowingUsersPage" // Paginate through more following users by increasing by...
val followingUsersPerPage = "sampleFollowingUsersPerPage" // How many per page you would like (Default is 16 following)
try {
val webApi = new WebApi
val response = webApi.artistList(page, onlyFields, perPage, ordering, genresKey, tier, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistRetrieve
Fetch a single Artist by Slug or ID
GET http://devcms.djs.com/api/artists/:pk/
Fetch a single Artist by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| with_events | String | URL query string | Fetch 20 related Dj events. Into the a new "events" index. | |
| event_page | String | URL query string | Paginate through more events by increasing by one. Starting at index of 2 because you get your first page on initial "with_events" request | |
| with_tracks | String | URL query string | Fetch 20 related Dj tracks. Into the a new "tracks" index. | |
| track_page | String | URL query string | Paginate through more tracks by increasing by one. Starting at index of 2 because you get your first page on initial "with_tracks" request | |
| with_featured_tracks | String | URL query string | Fetch 3 featured Dj tracks. Into the a new "with_featured_tracks" index. | |
| featured_track_page | String | URL query string | Paginate through more tracks by increasing by one. Starting at index of 2 because you get your first page on initial "with_featured_tracks" request | |
| event_per_page | String | URL query string | How many per page you would like (Default is 20 events) | |
| featured_track_per_page | String | URL query string | How many per page you would like (Default is 3 featured tracks) | |
| track_per_page | String | URL query string | How many per page you would like (Default is 9 featured tracks) | |
| with_followers | String | URL query string | Fetch favorites the "followers" index. | |
| followers_page | String | URL query string | Paginate through more follower users by increasing by one. Starting at index of 2 because you get your first page on initial "with_followers" request | |
| followers_per_page | String | URL query string | How many per page you would like (Default is 16 followers) | |
| with_artist_followers | String | URL query string | Fetch favorites the "artist_followers" index. | |
| artist_followers_page | String | URL query string | Paginate through more artist_follower users by increasing by one. Starting at index of 2 because you get your first page on initial "with_artist_followers" request | |
| artist_followers_per_page | String | URL query string | How many per page you would like (Default is 16 artist_followers) |
Request preview:
GET /api/artists/PK/?with_events=WITH_EVENTS&event_page=EVENT_PAGE&with_tracks=WITH_TRACKS&track_page=TRACK_PAGE&with_featured_tracks=WITH_FEATURED_TRACKS&featured_track_page=FEATURED_TRACK_PAGE&event_per_page=EVENT_PER_PAGE&featured_track_per_page=FEATURED_TRACK_PER_PAGE&track_per_page=TRACK_PER_PAGE&with_followers=WITH_FOLLOWERS&followers_page=FOLLOWERS_PAGE&followers_per_page=FOLLOWERS_PER_PAGE&with_artist_followers=WITH_ARTIST_FOLLOWERS&artist_followers_page=ARTIST_FOLLOWERS_PAGE&artist_followers_per_page=ARTIST_FOLLOWERS_PER_PAGE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns ArtistSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var withEvents: String = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
var eventPage: String = "sampleEventPage"; // Paginate through more events by increasing by one. ...
var withTracks: String = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
var trackPage: String = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
var withFeaturedTracks: String = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
var featuredTrackPage: String = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
var eventPerPage: String = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
var featuredTrackPerPage: String = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
var trackPerPage: String = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
var withFollowers: String = "sampleWithFollowers"; // Fetch favorites the "followers" index.
var followersPage: String = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
var followersPerPage: String = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
var withArtistFollowers: String = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
var artistFollowersPage: String = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
var artistFollowersPerPage: String = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
var webApi: WebApi = new WebApi();
var response: ArtistSerializer = webApi.artist_retrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/artists/<pk>/?with_events=<with_events>&event_page=<event_page>&with_tracks=<with_tracks>&track_page=<track_page>&with_featured_tracks=<with_featured_tracks>&featured_track_page=<featured_track_page>&event_per_page=<event_per_page>&featured_track_per_page=<featured_track_per_page>&track_per_page=<track_per_page>&with_followers=<with_followers>&followers_page=<followers_page>&followers_per_page=<followers_per_page>&with_artist_followers=<with_artist_followers>&artist_followers_page=<artist_followers_page>&artist_followers_per_page=<artist_followers_per_page>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
String trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
String withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
String featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
String featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
String trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_tracks'] = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
args['track_page'] = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
args['with_featured_tracks'] = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
args['featured_track_page'] = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
args['featured_track_per_page'] = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
args['track_per_page'] = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_artist_followers'] = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
args['artist_followers_page'] = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
args['artist_followers_per_page'] = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
swagger.Web.artistRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.artistRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withTracks = @"sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
NSString *trackPage = @"sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *withFeaturedTracks = @"sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
NSString *featuredTrackPage = @"sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 20 events)
NSString *featuredTrackPerPage = @"sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
NSString *trackPerPage = @"sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withArtistFollowers = @"sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
NSString *artistFollowersPage = @"sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
NSString *artistFollowersPerPage = @"sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistRetrieveWithCompletionBlock:pk
withEvents:withEvents
eventPage:eventPage
withTracks:withTracks
trackPage:trackPage
withFeaturedTracks:withFeaturedTracks
featuredTrackPage:featuredTrackPage
eventPerPage:eventPerPage
featuredTrackPerPage:featuredTrackPerPage
trackPerPage:trackPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withArtistFollowers:withArtistFollowers
artistFollowersPage:artistFollowersPage
artistFollowersPerPage:artistFollowersPerPage
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withTracks = "sampleWithTracks"; // Fetch 20 related Dj tracks. Into the a new "tracks" index.
$trackPage = "sampleTrackPage"; // Paginate through more tracks by increasing by one. ...
$withFeaturedTracks = "sampleWithFeaturedTracks"; // Fetch 3 featured Dj tracks. Into the a new...
$featuredTrackPage = "sampleFeaturedTrackPage"; // Paginate through more tracks by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 20 events)
$featuredTrackPerPage = "sampleFeaturedTrackPerPage"; // How many per page you would like (Default is 3 featured...
$trackPerPage = "sampleTrackPerPage"; // How many per page you would like (Default is 9 featured...
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withArtistFollowers = "sampleWithArtistFollowers"; // Fetch favorites the "artist_followers" index.
$artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more artist_follower users by increasing...
$artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ArtistSerializer (model)
$response = $web_api->artistRetrieve($pk, $withEvents, $eventPage, $withTracks, $trackPage, $withFeaturedTracks, $featuredTrackPage, $eventPerPage, $featuredTrackPerPage, $trackPerPage, $withFollowers, $followersPage, $followersPerPage, $withArtistFollowers, $artistFollowersPage, $artistFollowersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ArtistSerializer (model)
response = web_api.artist_retrieve(pk, with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page")
pprint(response)
# asynchronous call
# thread = web_api.artist_retrieve(pk, with_events="sample_with_events", event_page="sample_event_page", with_tracks="sample_with_tracks", track_page="sample_track_page", with_featured_tracks="sample_with_featured_tracks", featured_track_page="sample_featured_track_page", event_per_page="sample_event_per_page", featured_track_per_page="sample_featured_track_per_page", track_per_page="sample_track_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ArtistSerializer (model)
response = web_api.artist_retrieve(pk, :with_events => "sample_with_events", :event_page => "sample_event_page", :with_tracks => "sample_with_tracks", :track_page => "sample_track_page", :with_featured_tracks => "sample_with_featured_tracks", :featured_track_page => "sample_featured_track_page", :event_per_page => "sample_event_per_page", :featured_track_per_page => "sample_featured_track_per_page", :track_per_page => "sample_track_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_artist_followers => "sample_with_artist_followers", :artist_followers_page => "sample_artist_followers_page", :artist_followers_per_page => "sample_artist_followers_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withTracks = "sampleWithTracks" // Fetch 20 related Dj tracks. Into the a new "tracks" index.
val trackPage = "sampleTrackPage" // Paginate through more tracks by increasing by one. ...
val withFeaturedTracks = "sampleWithFeaturedTracks" // Fetch 3 featured Dj tracks. Into the a new...
val featuredTrackPage = "sampleFeaturedTrackPage" // Paginate through more tracks by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 20 events)
val featuredTrackPerPage = "sampleFeaturedTrackPerPage" // How many per page you would like (Default is 3 featured...
val trackPerPage = "sampleTrackPerPage" // How many per page you would like (Default is 9 featured...
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withArtistFollowers = "sampleWithArtistFollowers" // Fetch favorites the "artist_followers" index.
val artistFollowersPage = "sampleArtistFollowersPage" // Paginate through more artist_follower users by increasing...
val artistFollowersPerPage = "sampleArtistFollowersPerPage" // How many per page you would like (Default is 16...
try {
val webApi = new WebApi
val response = webApi.artistRetrieve(pk, withEvents, eventPage, withTracks, trackPage, withFeaturedTracks, featuredTrackPage, eventPerPage, featuredTrackPerPage, trackPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
artistUnfollow
Unfollow an artist with current logged in user
GET http://devcms.djs.com/api/artists/:pk/unfollow/
Unfollow an artist with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/artists/PK/unfollow/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns ArtistSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: ArtistSerializer = webApi.artist_unfollow(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistUnfollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/artists/<pk>/unfollow/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ArtistSerializer response = webApi.ArtistUnfollow(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
ArtistSerializer response = webApi.artistUnfollow(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.artistUnfollow(args, function(response) {
/* success callback */
console.log("Result of Web.artistUnfollow");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.artistUnfollow:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi artistUnfollowWithCompletionBlock:pk
completionHandler:^(SWGArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ArtistSerializer (model)
$response = $web_api->artistUnfollow($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ArtistSerializer (model)
response = web_api.artist_unfollow(pk)
pprint(response)
# asynchronous call
# thread = web_api.artist_unfollow(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ArtistSerializer (model)
response = web_api.artist_unfollow(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.artistUnfollow(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authAccessToken
Creates an access token for a given set of credentials
POST http://devcms.djs.com/api/auth/access-token/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Creates an access token for a given set of credentials. Access tokens may be for an 'anonymous user' (no username + password specified) for general API calls, or for an actual user to perform user-centric API calls.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| api_secret | String | HTTP Form | API Secret Given To Your App | |
| api_key | String | HTTP Form | API Key Given To Your App | |
| username | String | HTTP Form | Username logging in | |
| password | String | HTTP Form | Password logging in |
Request preview:
POST /api/auth/access-token/ HTTP/1.1
Host: devcms.djs.com
Content-Type: application/x-www-form-urlencoded
api_key=API_KEY&api_secret=API_SECRET&password=PASSWORD&username=USERNAMEThis endpoint returns AuthResponseSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 404 | NOT_FOUND |
| 500 | UNKNOWN |
Code Sample
var apiSecret: String = "sampleApiSecret"; // API Secret Given To Your App
var apiKey: String = "sampleApiKey"; // API Key Given To Your App
var username: String = "sampleUsername"; // Username logging in
var password: String = "samplePassword"; // Password logging in
try
{
var webApi: WebApi = new WebApi();
var response: AuthResponseSerializer = webApi.auth_access_token(apiSecret, apiKey, username, password);
}
catch (e:Error)
{
trace(e)
}
String apiSecret = "sampleApiSecret"; // API Secret Given To Your App
String apiKey = "sampleApiKey"; // API Key Given To Your App
String username = "sampleUsername"; // Username logging in
String password = "samplePassword"; // Password logging in
try {
WebApi webApi = new WebApi();
AuthResponseSerializer response = webApi.authAccessToken(apiSecret, apiKey, username, password);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/access-token/" \
-d "api_secret=<api_secret>" \
-d "api_key=<api_key>" \
-d "username=<username>" \
-d "password=<password>"String apiSecret = "sampleApiSecret"; // API Secret Given To Your App
String apiKey = "sampleApiKey"; // API Key Given To Your App
String username = "sampleUsername"; // Username logging in
String password = "samplePassword"; // Password logging in
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
AuthResponseSerializer response = webApi.AuthAccessToken(apiSecret, apiKey, username, password);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String apiSecret = "sampleApiSecret"; // API Secret Given To Your App
String apiKey = "sampleApiKey"; // API Key Given To Your App
String username = "sampleUsername"; // Username logging in
String password = "samplePassword"; // Password logging in
try {
WebApi webApi = new WebApi();
AuthResponseSerializer response = webApi.authAccessToken(apiSecret, apiKey, username, password);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['api_secret'] = "sampleApiSecret"; // API Secret Given To Your App
args['api_key'] = "sampleApiKey"; // API Key Given To Your App
args['username'] = "sampleUsername"; // Username logging in
args['password'] = "samplePassword"; // Password logging in
swagger.Web.authAccessToken(args, function(response) {
/* success callback */
console.log("Result of Web.authAccessToken");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authAccessToken:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *apiSecret = @"sampleApiSecret"; // API Secret Given To Your App
NSString *apiKey = @"sampleApiKey"; // API Key Given To Your App
NSString *username = @"sampleUsername"; // Username logging in
NSString *password = @"samplePassword"; // Password logging in
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// calling api method
[webApi authAccessTokenWithCompletionBlock:apiSecret
apiKey:apiKey
username:username
password:password
completionHandler:^(SWGAuthResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
$apiSecret = "sampleApiSecret"; // API Secret Given To Your App
$apiKey = "sampleApiKey"; // API Key Given To Your App
$username = "sampleUsername"; // Username logging in
$password = "samplePassword"; // Password logging in
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return AuthResponseSerializer (model)
$response = $web_api->authAccessToken($apiSecret, $apiKey, $username, $password);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
api_secret = "sample_api_secret" # API Secret Given To Your App
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return AuthResponseSerializer (model)
response = web_api.auth_access_token(api_secret, api_key="sample_api_key", username="sample_username", password="sample_password")
pprint(response)
# asynchronous call
# thread = web_api.auth_access_token(api_secret, api_key="sample_api_key", username="sample_username", password="sample_password", callback=callback_function)
except ApiException as e:
print(e)api_secret = "sample_api_secret" # API Secret Given To Your App
begin
web_api = DjsApi::WebApi.new
# return AuthResponseSerializer (model)
response = web_api.auth_access_token(api_secret, :api_key => "sample_api_key", :username => "sample_username", :password => "sample_password")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val apiSecret = "sampleApiSecret" // API Secret Given To Your App
val apiKey = "sampleApiKey" // API Key Given To Your App
val username = "sampleUsername" // Username logging in
val password = "samplePassword" // Password logging in
try {
val webApi = new WebApi
val response = webApi.authAccessToken(apiSecret, apiKey, username, password)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authCreateUser
Creates a new streaming user
POST http://devcms.djs.com/api/auth/create-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Creates a new streaming user. Even upon errors, this method will respond back with a 200 response code. Check the error section for any object other than false. If it is an object traverse according
| Name | Type | Location | Description | |
|---|---|---|---|---|
| String | HTTP Form | email address | ||
| password | String | HTTP Form | password | |
| facebook_id | String | HTTP Form | Facebook internal user id if this is a facebook user | |
| plan_slug | String | HTTP Form | Must be either pro_trial, pro or free of what type of user this is. Will default to pro_trial | |
| first_name | String | HTTP Form | First Name | |
| last_name | String | HTTP Form | Last Name | |
| image_download_url | String | HTTP Form | URL On the web to download and assign to profile | |
| String | HTTP Form | instagram URL or slug | ||
| closest_location | String | HTTP Form | Users closest location with the slug of the location they have chosen for their profile | |
| String | HTTP Form | facebook URL or slug | ||
| website | String | HTTP Form | website URL - FYI all schemes will be stripped and you should always prepend value with http scheme | |
| String | HTTP Form | twitter URL or slug | ||
| description | String | HTTP Form | Stream user profile description |
Request preview:
POST /api/auth/create-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
closest_location=CLOSEST_LOCATION&description=DESCRIPTION&email=EMAIL&facebook=FACEBOOK&facebook_id=FACEBOOK_ID&first_name=FIRST_NAME&image_download_url=IMAGE_DOWNLOAD_URL&instagram=INSTAGRAM&last_name=LAST_NAME&password=PASSWORD&plan_slug=PLAN_SLUG&twitter=TWITTER&website=WEBSITEThis endpoint returns ActiveUserSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var email: String = "sampleEmail"; // email address
var password: String = "samplePassword"; // password
var facebookId: String = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
var planSlug: String = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
var firstName: String = "sampleFirstName"; // First Name
var lastName: String = "sampleLastName"; // Last Name
var imageDownloadUrl: String = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
var instagram: String = "sampleInstagram"; // instagram URL or slug
var closestLocation: String = "sampleClosestLocation"; // Users closest location with the slug of the location they...
var facebook: String = "sampleFacebook"; // facebook URL or slug
var website: String = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
var twitter: String = "sampleTwitter"; // twitter URL or slug
var description: String = "sampleDescription"; // Stream user profile description
try
{
var webApi: WebApi = new WebApi();
var response: ActiveUserSerializer = webApi.auth_create_user(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
}
catch (e:Error)
{
trace(e)
}
String email = "sampleEmail"; // email address
String password = "samplePassword"; // password
String facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String firstName = "sampleFirstName"; // First Name
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // Stream user profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/create-user/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "email=<email>" \
-d "password=<password>" \
-d "facebook_id=<facebook_id>" \
-d "plan_slug=<plan_slug>" \
-d "first_name=<first_name>" \
-d "last_name=<last_name>" \
-d "image_download_url=<image_download_url>" \
-d "instagram=<instagram>" \
-d "closest_location=<closest_location>" \
-d "facebook=<facebook>" \
-d "website=<website>" \
-d "twitter=<twitter>" \
-d "description=<description>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String email = "sampleEmail"; // email address
String password = "samplePassword"; // password
String facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String firstName = "sampleFirstName"; // First Name
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // Stream user profile description
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveUserSerializer response = webApi.AuthCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String email = "sampleEmail"; // email address
String password = "samplePassword"; // password
String facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String firstName = "sampleFirstName"; // First Name
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // Stream user profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['email'] = "sampleEmail"; // email address
args['password'] = "samplePassword"; // password
args['facebook_id'] = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
args['plan_slug'] = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
args['first_name'] = "sampleFirstName"; // First Name
args['last_name'] = "sampleLastName"; // Last Name
args['image_download_url'] = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
args['instagram'] = "sampleInstagram"; // instagram URL or slug
args['closest_location'] = "sampleClosestLocation"; // Users closest location with the slug of the location they...
args['facebook'] = "sampleFacebook"; // facebook URL or slug
args['website'] = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
args['twitter'] = "sampleTwitter"; // twitter URL or slug
args['description'] = "sampleDescription"; // Stream user profile description
swagger.Web.authCreateUser(args, function(response) {
/* success callback */
console.log("Result of Web.authCreateUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authCreateUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *email = @"sampleEmail"; // email address
NSString *password = @"samplePassword"; // password
NSString *facebookId = @"sampleFacebookId"; // Facebook internal user id if this is a facebook user
NSString *planSlug = @"samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
NSString *firstName = @"sampleFirstName"; // First Name
NSString *lastName = @"sampleLastName"; // Last Name
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // URL On the web to download and assign to profile
NSString *instagram = @"sampleInstagram"; // instagram URL or slug
NSString *closestLocation = @"sampleClosestLocation"; // Users closest location with the slug of the location they...
NSString *facebook = @"sampleFacebook"; // facebook URL or slug
NSString *website = @"sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
NSString *twitter = @"sampleTwitter"; // twitter URL or slug
NSString *description = @"sampleDescription"; // Stream user profile description
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authCreateUserWithCompletionBlock:email
password:password
facebookId:facebookId
planSlug:planSlug
firstName:firstName
lastName:lastName
imageDownloadUrl:imageDownloadUrl
instagram:instagram
closestLocation:closestLocation
facebook:facebook
website:website
twitter:twitter
description:description
completionHandler:^(SWGActiveUserSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$email = "sampleEmail"; // email address
$password = "samplePassword"; // password
$facebookId = "sampleFacebookId"; // Facebook internal user id if this is a facebook user
$planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
$firstName = "sampleFirstName"; // First Name
$lastName = "sampleLastName"; // Last Name
$imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
$instagram = "sampleInstagram"; // instagram URL or slug
$closestLocation = "sampleClosestLocation"; // Users closest location with the slug of the location they...
$facebook = "sampleFacebook"; // facebook URL or slug
$website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
$twitter = "sampleTwitter"; // twitter URL or slug
$description = "sampleDescription"; // Stream user profile description
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ActiveUserSerializer (model)
$response = $web_api->authCreateUser($email, $password, $facebookId, $planSlug, $firstName, $lastName, $imageDownloadUrl, $instagram, $closestLocation, $facebook, $website, $twitter, $description);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
email = "sample_email" # email address
password = "sample_password" # password
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ActiveUserSerializer (model)
response = web_api.auth_create_user(email, password, facebook_id="sample_facebook_id", plan_slug="sample_plan_slug", first_name="sample_first_name", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", closest_location="sample_closest_location", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description")
pprint(response)
# asynchronous call
# thread = web_api.auth_create_user(email, password, facebook_id="sample_facebook_id", plan_slug="sample_plan_slug", first_name="sample_first_name", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", closest_location="sample_closest_location", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
email = "sample_email" # email address
password = "sample_password" # password
begin
web_api = DjsApi::WebApi.new
# return ActiveUserSerializer (model)
response = web_api.auth_create_user(email, password, :facebook_id => "sample_facebook_id", :plan_slug => "sample_plan_slug", :first_name => "sample_first_name", :last_name => "sample_last_name", :image_download_url => "sample_image_download_url", :instagram => "sample_instagram", :closest_location => "sample_closest_location", :facebook => "sample_facebook", :website => "sample_website", :twitter => "sample_twitter", :description => "sample_description")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val email = "sampleEmail" // email address
val password = "samplePassword" // password
val facebookId = "sampleFacebookId" // Facebook internal user id if this is a facebook user
val planSlug = "samplePlanSlug" // Must be either pro_trial, pro or free of what type of...
val firstName = "sampleFirstName" // First Name
val lastName = "sampleLastName" // Last Name
val imageDownloadUrl = "sampleImageDownloadUrl" // URL On the web to download and assign to profile
val instagram = "sampleInstagram" // instagram URL or slug
val closestLocation = "sampleClosestLocation" // Users closest location with the slug of the location they...
val facebook = "sampleFacebook" // facebook URL or slug
val website = "sampleWebsite" // website URL - FYI all schemes will be stripped and you...
val twitter = "sampleTwitter" // twitter URL or slug
val description = "sampleDescription" // Stream user profile description
try {
val webApi = new WebApi
val response = webApi.authCreateUser(email, password, facebookId, planSlug, firstName, lastName, imageDownloadUrl, instagram, closestLocation, facebook, website, twitter, description)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authFollowUser
Follow a user with current logged in user
GET http://devcms.djs.com/api/auth/:pk/follow-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Follow a user with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/auth/PK/follow-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns SuccessSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: SuccessSerializer = webApi.auth_follow_user(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authFollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/auth/<pk>/follow-user/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthFollowUser(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authFollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.authFollowUser(args, function(response) {
/* success callback */
console.log("Result of Web.authFollowUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authFollowUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authFollowUserWithCompletionBlock:pk
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessSerializer (model)
$response = $web_api->authFollowUser($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessSerializer (model)
response = web_api.auth_follow_user(pk)
pprint(response)
# asynchronous call
# thread = web_api.auth_follow_user(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return SuccessSerializer (model)
response = web_api.auth_follow_user(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.authFollowUser(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authList
Show endpoints related to authorization
GET http://devcms.djs.com/api/auth/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Show endpoints related to authorization
No parameter defined
Request preview:
GET /api/auth/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns AuthIndexResponseSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 404 | NOT_FOUND |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
try
{
var webApi: WebApi = new WebApi();
var response: AuthIndexResponseSerializer = webApi.auth_list();
}
catch (e:Error)
{
trace(e)
}
try {
WebApi webApi = new WebApi();
AuthIndexResponseSerializer response = webApi.authList();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/auth/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
AuthIndexResponseSerializer response = webApi.AuthList();
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
try {
WebApi webApi = new WebApi();
AuthIndexResponseSerializer response = webApi.authList();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
swagger.Web.authList(args, function(response) {
/* success callback */
console.log("Result of Web.authList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authListWithCompletionBlock:^(SWGAuthIndexResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return AuthIndexResponseSerializer (model)
$response = $web_api->authList();
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return AuthIndexResponseSerializer (model)
response = web_api.auth_list()
pprint(response)
# asynchronous call
# thread = web_api.auth_list(, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return AuthIndexResponseSerializer (model)
response = web_api.auth_list()
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
try {
val webApi = new WebApi
val response = webApi.authList()
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authResetPasswordComplete
Complete a reset password request
POST http://devcms.djs.com/api/auth/reset-password-complete/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Complete a reset password request
| Name | Type | Location | Description | |
|---|---|---|---|---|
| token | String | HTTP Form | Token | |
| new_password | String | HTTP Form | New Password | |
| String | HTTP Form |
Request preview:
POST /api/auth/reset-password-complete/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
email=EMAIL&new_password=NEW_PASSWORD&token=TOKENThis endpoint returns SuccessSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var token: String = "sampleToken"; // Token
var newPassword: String = "sampleNewPassword"; // New Password
var email: String = "sampleEmail"; // Email
try
{
var webApi: WebApi = new WebApi();
var response: SuccessSerializer = webApi.auth_reset_password_complete(token, newPassword, email);
}
catch (e:Error)
{
trace(e)
}
String token = "sampleToken"; // Token
String newPassword = "sampleNewPassword"; // New Password
String email = "sampleEmail"; // Email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordComplete(token, newPassword, email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/reset-password-complete/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "token=<token>" \
-d "new_password=<new_password>" \
-d "email=<email>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String token = "sampleToken"; // Token
String newPassword = "sampleNewPassword"; // New Password
String email = "sampleEmail"; // Email
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthResetPasswordComplete(token, newPassword, email);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String token = "sampleToken"; // Token
String newPassword = "sampleNewPassword"; // New Password
String email = "sampleEmail"; // Email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordComplete(token, newPassword, email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['token'] = "sampleToken"; // Token
args['new_password'] = "sampleNewPassword"; // New Password
args['email'] = "sampleEmail"; // Email
swagger.Web.authResetPasswordComplete(args, function(response) {
/* success callback */
console.log("Result of Web.authResetPasswordComplete");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authResetPasswordComplete:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *token = @"sampleToken"; // Token
NSString *newPassword = @"sampleNewPassword"; // New Password
NSString *email = @"sampleEmail"; // Email
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authResetPasswordCompleteWithCompletionBlock:token
newPassword:newPassword
email:email
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$token = "sampleToken"; // Token
$newPassword = "sampleNewPassword"; // New Password
$email = "sampleEmail"; // Email
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessSerializer (model)
$response = $web_api->authResetPasswordComplete($token, $newPassword, $email);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
token = "sample_token" # Token
new_password = "sample_new_password" # New Password
email = "sample_email" # Email
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessSerializer (model)
response = web_api.auth_reset_password_complete(token, new_password, email)
pprint(response)
# asynchronous call
# thread = web_api.auth_reset_password_complete(token, new_password, email, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
token = "sample_token" # Token
new_password = "sample_new_password" # New Password
email = "sample_email" # Email
begin
web_api = DjsApi::WebApi.new
# return SuccessSerializer (model)
response = web_api.auth_reset_password_complete(token, new_password, email)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val token = "sampleToken" // Token
val newPassword = "sampleNewPassword" // New Password
val email = "sampleEmail" // Email
try {
val webApi = new WebApi
val response = webApi.authResetPasswordComplete(token, newPassword, email)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authResetPasswordSendEmail
Reset Password
POST http://devcms.djs.com/api/auth/reset-password-send-email/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Reset Password
| Name | Type | Location | Description | |
|---|---|---|---|---|
| String | HTTP Form | User email |
Request preview:
POST /api/auth/reset-password-send-email/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
email=EMAILThis endpoint returns SuccessSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var email: String = "sampleEmail"; // User email
try
{
var webApi: WebApi = new WebApi();
var response: SuccessSerializer = webApi.auth_reset_password_send_email(email);
}
catch (e:Error)
{
trace(e)
}
String email = "sampleEmail"; // User email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordSendEmail(email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/reset-password-send-email/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "email=<email>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String email = "sampleEmail"; // User email
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthResetPasswordSendEmail(email);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String email = "sampleEmail"; // User email
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authResetPasswordSendEmail(email);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['email'] = "sampleEmail"; // User email
swagger.Web.authResetPasswordSendEmail(args, function(response) {
/* success callback */
console.log("Result of Web.authResetPasswordSendEmail");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authResetPasswordSendEmail:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *email = @"sampleEmail"; // User email
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authResetPasswordSendEmailWithCompletionBlock:email
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$email = "sampleEmail"; // User email
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessSerializer (model)
$response = $web_api->authResetPasswordSendEmail($email);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessSerializer (model)
response = web_api.auth_reset_password_send_email(email="sample_email")
pprint(response)
# asynchronous call
# thread = web_api.auth_reset_password_send_email(email="sample_email", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return SuccessSerializer (model)
response = web_api.auth_reset_password_send_email(:email => "sample_email")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val email = "sampleEmail" // User email
try {
val webApi = new WebApi
val response = webApi.authResetPasswordSendEmail(email)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authStatus
Get information about current token and login information
GET http://devcms.djs.com/api/auth/status/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Get information about current token and login information
No parameter defined
Request preview:
GET /api/auth/status/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns AuthStatusResponseSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 404 | NOT_FOUND |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
try
{
var webApi: WebApi = new WebApi();
var response: AuthStatusResponseSerializer = webApi.auth_status();
}
catch (e:Error)
{
trace(e)
}
try {
WebApi webApi = new WebApi();
AuthStatusResponseSerializer response = webApi.authStatus();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/auth/status/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
AuthStatusResponseSerializer response = webApi.AuthStatus();
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
try {
WebApi webApi = new WebApi();
AuthStatusResponseSerializer response = webApi.authStatus();
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
swagger.Web.authStatus(args, function(response) {
/* success callback */
console.log("Result of Web.authStatus");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authStatus:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authStatusWithCompletionBlock:^(SWGAuthStatusResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return AuthStatusResponseSerializer (model)
$response = $web_api->authStatus();
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return AuthStatusResponseSerializer (model)
response = web_api.auth_status()
pprint(response)
# asynchronous call
# thread = web_api.auth_status(, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return AuthStatusResponseSerializer (model)
response = web_api.auth_status()
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
try {
val webApi = new WebApi
val response = webApi.authStatus()
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authUnfollowUser
Unfollow a user with current logged in user
GET http://devcms.djs.com/api/auth/:pk/unfollow-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Unfollow a user with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/auth/PK/unfollow-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns SuccessSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: SuccessSerializer = webApi.auth_unfollow_user(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authUnfollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/auth/<pk>/unfollow-user/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.AuthUnfollowUser(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.authUnfollowUser(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.authUnfollowUser(args, function(response) {
/* success callback */
console.log("Result of Web.authUnfollowUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authUnfollowUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authUnfollowUserWithCompletionBlock:pk
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessSerializer (model)
$response = $web_api->authUnfollowUser($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessSerializer (model)
response = web_api.auth_unfollow_user(pk)
pprint(response)
# asynchronous call
# thread = web_api.auth_unfollow_user(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return SuccessSerializer (model)
response = web_api.auth_unfollow_user(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.authUnfollowUser(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authUpdateArtistUser
Update an artist user
POST http://devcms.djs.com/api/auth/:pk/update-artist-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Update an artist user. Even upon errors, this method will respond back with a 200 response code. Check the error section for any object other than false. If error key is an object traverse according to show error to end user.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| itunes_link | String | HTTP Form | Itunes URL (Fully qualified) | |
| youtube | String | HTTP Form | youtube Slug | |
| contact_email | String | HTTP Form | Email business contact | |
| dj_name | String | HTTP Form | DJ Name | |
| payment_address1 | String | HTTP Form | Payment Address 1 | |
| payment_address2 | String | HTTP Form | Payment Address 2 | |
| payment_city | String | HTTP Form | Payment City | |
| payment_state | String | HTTP Form | Payment State | |
| payment_zip | String | HTTP Form | Payment Zip | |
| country | String | HTTP Form | Country Code | |
| soundcloud_username | String | HTTP Form | Soundcloud username | |
| payment_ein | String | HTTP Form | Payment EIN Number | |
| String | HTTP Form | email address in which the user logs in as | ||
| password | String | HTTP Form | password | |
| first_name | String | HTTP Form | First Name | |
| plan_slug | String | HTTP Form | Must be either pro_trial, pro or free of what type of user this is. Will default to pro_trial | |
| slug | String | HTTP Form | User slug | |
| last_name | String | HTTP Form | Last Name | |
| image_download_url | String | HTTP Form | URL On the web to download and assign to profile | |
| String | HTTP Form | instagram URL or slug | ||
| String | HTTP Form | facebook URL or slug | ||
| website | String | HTTP Form | website URL - FYI all schemes will be stripped and you should always prepend value with http scheme | |
| String | HTTP Form | twitter URL or slug | ||
| description | String | HTTP Form | User profile description |
Request preview:
POST /api/auth/PK/update-artist-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
contact_email=CONTACT_EMAIL&country=COUNTRY&description=DESCRIPTION&dj_name=DJ_NAME&email=EMAIL&facebook=FACEBOOK&first_name=FIRST_NAME&image_download_url=IMAGE_DOWNLOAD_URL&instagram=INSTAGRAM&itunes_link=ITUNES_LINK&last_name=LAST_NAME&password=PASSWORD&payment_address1=PAYMENT_ADDRESS1&payment_address2=PAYMENT_ADDRESS2&payment_city=PAYMENT_CITY&payment_ein=PAYMENT_EIN&payment_state=PAYMENT_STATE&payment_zip=PAYMENT_ZIP&plan_slug=PLAN_SLUG&slug=SLUG&soundcloud_username=SOUNDCLOUD_USERNAME&twitter=TWITTER&website=WEBSITE&youtube=YOUTUBEThis endpoint returns ActiveArtistSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var itunesLink: String = "sampleItunesLink"; // Itunes URL (Fully qualified)
var youtube: String = "sampleYoutube"; // youtube Slug
var contactEmail: String = "sampleContactEmail"; // Email business contact
var djName: String = "sampleDjName"; // DJ Name
var paymentAddress1: String = "samplePaymentAddress1"; // Payment Address 1
var paymentAddress2: String = "samplePaymentAddress2"; // Payment Address 2
var paymentCity: String = "samplePaymentCity"; // Payment City
var paymentState: String = "samplePaymentState"; // Payment State
var paymentZip: String = "samplePaymentZip"; // Payment Zip
var country: String = "sampleCountry"; // Country Code
var soundcloudUsername: String = "sampleSoundcloudUsername"; // Soundcloud username
var paymentEin: String = "samplePaymentEin"; // Payment EIN Number
var email: String = "sampleEmail"; // email address in which the user logs in as
var password: String = "samplePassword"; // password
var firstName: String = "sampleFirstName"; // First Name
var planSlug: String = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
var slug: String = "sampleSlug"; // User slug
var lastName: String = "sampleLastName"; // Last Name
var imageDownloadUrl: String = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
var instagram: String = "sampleInstagram"; // instagram URL or slug
var facebook: String = "sampleFacebook"; // facebook URL or slug
var website: String = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
var twitter: String = "sampleTwitter"; // twitter URL or slug
var description: String = "sampleDescription"; // User profile description
try
{
var webApi: WebApi = new WebApi();
var response: ActiveArtistSerializer = webApi.auth_update_artist_user(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
String youtube = "sampleYoutube"; // youtube Slug
String contactEmail = "sampleContactEmail"; // Email business contact
String djName = "sampleDjName"; // DJ Name
String paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
String paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
String paymentCity = "samplePaymentCity"; // Payment City
String paymentState = "samplePaymentState"; // Payment State
String paymentZip = "samplePaymentZip"; // Payment Zip
String country = "sampleCountry"; // Country Code
String soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
String paymentEin = "samplePaymentEin"; // Payment EIN Number
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/<pk>/update-artist-user/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "itunes_link=<itunes_link>" \
-d "youtube=<youtube>" \
-d "contact_email=<contact_email>" \
-d "dj_name=<dj_name>" \
-d "payment_address1=<payment_address1>" \
-d "payment_address2=<payment_address2>" \
-d "payment_city=<payment_city>" \
-d "payment_state=<payment_state>" \
-d "payment_zip=<payment_zip>" \
-d "country=<country>" \
-d "soundcloud_username=<soundcloud_username>" \
-d "payment_ein=<payment_ein>" \
-d "email=<email>" \
-d "password=<password>" \
-d "first_name=<first_name>" \
-d "plan_slug=<plan_slug>" \
-d "slug=<slug>" \
-d "last_name=<last_name>" \
-d "image_download_url=<image_download_url>" \
-d "instagram=<instagram>" \
-d "facebook=<facebook>" \
-d "website=<website>" \
-d "twitter=<twitter>" \
-d "description=<description>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
String youtube = "sampleYoutube"; // youtube Slug
String contactEmail = "sampleContactEmail"; // Email business contact
String djName = "sampleDjName"; // DJ Name
String paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
String paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
String paymentCity = "samplePaymentCity"; // Payment City
String paymentState = "samplePaymentState"; // Payment State
String paymentZip = "samplePaymentZip"; // Payment Zip
String country = "sampleCountry"; // Country Code
String soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
String paymentEin = "samplePaymentEin"; // Payment EIN Number
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveArtistSerializer response = webApi.AuthUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
String youtube = "sampleYoutube"; // youtube Slug
String contactEmail = "sampleContactEmail"; // Email business contact
String djName = "sampleDjName"; // DJ Name
String paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
String paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
String paymentCity = "samplePaymentCity"; // Payment City
String paymentState = "samplePaymentState"; // Payment State
String paymentZip = "samplePaymentZip"; // Payment Zip
String country = "sampleCountry"; // Country Code
String soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
String paymentEin = "samplePaymentEin"; // Payment EIN Number
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['itunes_link'] = "sampleItunesLink"; // Itunes URL (Fully qualified)
args['youtube'] = "sampleYoutube"; // youtube Slug
args['contact_email'] = "sampleContactEmail"; // Email business contact
args['dj_name'] = "sampleDjName"; // DJ Name
args['payment_address1'] = "samplePaymentAddress1"; // Payment Address 1
args['payment_address2'] = "samplePaymentAddress2"; // Payment Address 2
args['payment_city'] = "samplePaymentCity"; // Payment City
args['payment_state'] = "samplePaymentState"; // Payment State
args['payment_zip'] = "samplePaymentZip"; // Payment Zip
args['country'] = "sampleCountry"; // Country Code
args['soundcloud_username'] = "sampleSoundcloudUsername"; // Soundcloud username
args['payment_ein'] = "samplePaymentEin"; // Payment EIN Number
args['email'] = "sampleEmail"; // email address in which the user logs in as
args['password'] = "samplePassword"; // password
args['first_name'] = "sampleFirstName"; // First Name
args['plan_slug'] = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
args['slug'] = "sampleSlug"; // User slug
args['last_name'] = "sampleLastName"; // Last Name
args['image_download_url'] = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
args['instagram'] = "sampleInstagram"; // instagram URL or slug
args['facebook'] = "sampleFacebook"; // facebook URL or slug
args['website'] = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
args['twitter'] = "sampleTwitter"; // twitter URL or slug
args['description'] = "sampleDescription"; // User profile description
swagger.Web.authUpdateArtistUser(args, function(response) {
/* success callback */
console.log("Result of Web.authUpdateArtistUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authUpdateArtistUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *itunesLink = @"sampleItunesLink"; // Itunes URL (Fully qualified)
NSString *youtube = @"sampleYoutube"; // youtube Slug
NSString *contactEmail = @"sampleContactEmail"; // Email business contact
NSString *djName = @"sampleDjName"; // DJ Name
NSString *paymentAddress1 = @"samplePaymentAddress1"; // Payment Address 1
NSString *paymentAddress2 = @"samplePaymentAddress2"; // Payment Address 2
NSString *paymentCity = @"samplePaymentCity"; // Payment City
NSString *paymentState = @"samplePaymentState"; // Payment State
NSString *paymentZip = @"samplePaymentZip"; // Payment Zip
NSString *country = @"sampleCountry"; // Country Code
NSString *soundcloudUsername = @"sampleSoundcloudUsername"; // Soundcloud username
NSString *paymentEin = @"samplePaymentEin"; // Payment EIN Number
NSString *email = @"sampleEmail"; // email address in which the user logs in as
NSString *password = @"samplePassword"; // password
NSString *firstName = @"sampleFirstName"; // First Name
NSString *planSlug = @"samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
NSString *slug = @"sampleSlug"; // User slug
NSString *lastName = @"sampleLastName"; // Last Name
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // URL On the web to download and assign to profile
NSString *instagram = @"sampleInstagram"; // instagram URL or slug
NSString *facebook = @"sampleFacebook"; // facebook URL or slug
NSString *website = @"sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
NSString *twitter = @"sampleTwitter"; // twitter URL or slug
NSString *description = @"sampleDescription"; // User profile description
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authUpdateArtistUserWithCompletionBlock:pk
itunesLink:itunesLink
youtube:youtube
contactEmail:contactEmail
djName:djName
paymentAddress1:paymentAddress1
paymentAddress2:paymentAddress2
paymentCity:paymentCity
paymentState:paymentState
paymentZip:paymentZip
country:country
soundcloudUsername:soundcloudUsername
paymentEin:paymentEin
email:email
password:password
firstName:firstName
planSlug:planSlug
slug:slug
lastName:lastName
imageDownloadUrl:imageDownloadUrl
instagram:instagram
facebook:facebook
website:website
twitter:twitter
description:description
completionHandler:^(SWGActiveArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$itunesLink = "sampleItunesLink"; // Itunes URL (Fully qualified)
$youtube = "sampleYoutube"; // youtube Slug
$contactEmail = "sampleContactEmail"; // Email business contact
$djName = "sampleDjName"; // DJ Name
$paymentAddress1 = "samplePaymentAddress1"; // Payment Address 1
$paymentAddress2 = "samplePaymentAddress2"; // Payment Address 2
$paymentCity = "samplePaymentCity"; // Payment City
$paymentState = "samplePaymentState"; // Payment State
$paymentZip = "samplePaymentZip"; // Payment Zip
$country = "sampleCountry"; // Country Code
$soundcloudUsername = "sampleSoundcloudUsername"; // Soundcloud username
$paymentEin = "samplePaymentEin"; // Payment EIN Number
$email = "sampleEmail"; // email address in which the user logs in as
$password = "samplePassword"; // password
$firstName = "sampleFirstName"; // First Name
$planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
$slug = "sampleSlug"; // User slug
$lastName = "sampleLastName"; // Last Name
$imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
$instagram = "sampleInstagram"; // instagram URL or slug
$facebook = "sampleFacebook"; // facebook URL or slug
$website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
$twitter = "sampleTwitter"; // twitter URL or slug
$description = "sampleDescription"; // User profile description
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ActiveArtistSerializer (model)
$response = $web_api->authUpdateArtistUser($pk, $itunesLink, $youtube, $contactEmail, $djName, $paymentAddress1, $paymentAddress2, $paymentCity, $paymentState, $paymentZip, $country, $soundcloudUsername, $paymentEin, $email, $password, $firstName, $planSlug, $slug, $lastName, $imageDownloadUrl, $instagram, $facebook, $website, $twitter, $description);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ActiveArtistSerializer (model)
response = web_api.auth_update_artist_user(pk, itunes_link="sample_itunes_link", youtube="sample_youtube", contact_email="sample_contact_email", dj_name="sample_dj_name", payment_address1="sample_payment_address1", payment_address2="sample_payment_address2", payment_city="sample_payment_city", payment_state="sample_payment_state", payment_zip="sample_payment_zip", country="sample_country", soundcloud_username="sample_soundcloud_username", payment_ein="sample_payment_ein", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description")
pprint(response)
# asynchronous call
# thread = web_api.auth_update_artist_user(pk, itunes_link="sample_itunes_link", youtube="sample_youtube", contact_email="sample_contact_email", dj_name="sample_dj_name", payment_address1="sample_payment_address1", payment_address2="sample_payment_address2", payment_city="sample_payment_city", payment_state="sample_payment_state", payment_zip="sample_payment_zip", country="sample_country", soundcloud_username="sample_soundcloud_username", payment_ein="sample_payment_ein", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ActiveArtistSerializer (model)
response = web_api.auth_update_artist_user(pk, :itunes_link => "sample_itunes_link", :youtube => "sample_youtube", :contact_email => "sample_contact_email", :dj_name => "sample_dj_name", :payment_address1 => "sample_payment_address1", :payment_address2 => "sample_payment_address2", :payment_city => "sample_payment_city", :payment_state => "sample_payment_state", :payment_zip => "sample_payment_zip", :country => "sample_country", :soundcloud_username => "sample_soundcloud_username", :payment_ein => "sample_payment_ein", :email => "sample_email", :password => "sample_password", :first_name => "sample_first_name", :plan_slug => "sample_plan_slug", :slug => "sample_slug", :last_name => "sample_last_name", :image_download_url => "sample_image_download_url", :instagram => "sample_instagram", :facebook => "sample_facebook", :website => "sample_website", :twitter => "sample_twitter", :description => "sample_description")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val itunesLink = "sampleItunesLink" // Itunes URL (Fully qualified)
val youtube = "sampleYoutube" // youtube Slug
val contactEmail = "sampleContactEmail" // Email business contact
val djName = "sampleDjName" // DJ Name
val paymentAddress1 = "samplePaymentAddress1" // Payment Address 1
val paymentAddress2 = "samplePaymentAddress2" // Payment Address 2
val paymentCity = "samplePaymentCity" // Payment City
val paymentState = "samplePaymentState" // Payment State
val paymentZip = "samplePaymentZip" // Payment Zip
val country = "sampleCountry" // Country Code
val soundcloudUsername = "sampleSoundcloudUsername" // Soundcloud username
val paymentEin = "samplePaymentEin" // Payment EIN Number
val email = "sampleEmail" // email address in which the user logs in as
val password = "samplePassword" // password
val firstName = "sampleFirstName" // First Name
val planSlug = "samplePlanSlug" // Must be either pro_trial, pro or free of what type of...
val slug = "sampleSlug" // User slug
val lastName = "sampleLastName" // Last Name
val imageDownloadUrl = "sampleImageDownloadUrl" // URL On the web to download and assign to profile
val instagram = "sampleInstagram" // instagram URL or slug
val facebook = "sampleFacebook" // facebook URL or slug
val website = "sampleWebsite" // website URL - FYI all schemes will be stripped and you...
val twitter = "sampleTwitter" // twitter URL or slug
val description = "sampleDescription" // User profile description
try {
val webApi = new WebApi
val response = webApi.authUpdateArtistUser(pk, itunesLink, youtube, contactEmail, djName, paymentAddress1, paymentAddress2, paymentCity, paymentState, paymentZip, country, soundcloudUsername, paymentEin, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authUpdateUser
Update a user
POST http://devcms.djs.com/api/auth/:pk/update-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. Update a user. Even upon errors, this method will respond back with a 200 response code. Check the error section for any object other than false. If error key is an object traverse according to show error to end user.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| closest_location | String | HTTP Form | Update users closest location with the slug of the location they have chosen for their profile | |
| String | HTTP Form | email address in which the user logs in as | ||
| password | String | HTTP Form | password | |
| first_name | String | HTTP Form | First Name | |
| plan_slug | String | HTTP Form | Must be either pro_trial, pro or free of what type of user this is. Will default to pro_trial | |
| slug | String | HTTP Form | User slug | |
| last_name | String | HTTP Form | Last Name | |
| image_download_url | String | HTTP Form | URL On the web to download and assign to profile | |
| String | HTTP Form | instagram URL or slug | ||
| String | HTTP Form | facebook URL or slug | ||
| website | String | HTTP Form | website URL - FYI all schemes will be stripped and you should always prepend value with http scheme | |
| String | HTTP Form | twitter URL or slug | ||
| description | String | HTTP Form | User profile description |
Request preview:
POST /api/auth/PK/update-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
closest_location=CLOSEST_LOCATION&description=DESCRIPTION&email=EMAIL&facebook=FACEBOOK&first_name=FIRST_NAME&image_download_url=IMAGE_DOWNLOAD_URL&instagram=INSTAGRAM&last_name=LAST_NAME&password=PASSWORD&plan_slug=PLAN_SLUG&slug=SLUG&twitter=TWITTER&website=WEBSITEThis endpoint returns ActiveUserSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var closestLocation: String = "sampleClosestLocation"; // Update users closest location with the slug of the...
var email: String = "sampleEmail"; // email address in which the user logs in as
var password: String = "samplePassword"; // password
var firstName: String = "sampleFirstName"; // First Name
var planSlug: String = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
var slug: String = "sampleSlug"; // User slug
var lastName: String = "sampleLastName"; // Last Name
var imageDownloadUrl: String = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
var instagram: String = "sampleInstagram"; // instagram URL or slug
var facebook: String = "sampleFacebook"; // facebook URL or slug
var website: String = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
var twitter: String = "sampleTwitter"; // twitter URL or slug
var description: String = "sampleDescription"; // User profile description
try
{
var webApi: WebApi = new WebApi();
var response: ActiveUserSerializer = webApi.auth_update_user(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/<pk>/update-user/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "closest_location=<closest_location>" \
-d "email=<email>" \
-d "password=<password>" \
-d "first_name=<first_name>" \
-d "plan_slug=<plan_slug>" \
-d "slug=<slug>" \
-d "last_name=<last_name>" \
-d "image_download_url=<image_download_url>" \
-d "instagram=<instagram>" \
-d "facebook=<facebook>" \
-d "website=<website>" \
-d "twitter=<twitter>" \
-d "description=<description>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveUserSerializer response = webApi.AuthUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
String email = "sampleEmail"; // email address in which the user logs in as
String password = "samplePassword"; // password
String firstName = "sampleFirstName"; // First Name
String planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
String slug = "sampleSlug"; // User slug
String lastName = "sampleLastName"; // Last Name
String imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
String instagram = "sampleInstagram"; // instagram URL or slug
String facebook = "sampleFacebook"; // facebook URL or slug
String website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
String twitter = "sampleTwitter"; // twitter URL or slug
String description = "sampleDescription"; // User profile description
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['closest_location'] = "sampleClosestLocation"; // Update users closest location with the slug of the...
args['email'] = "sampleEmail"; // email address in which the user logs in as
args['password'] = "samplePassword"; // password
args['first_name'] = "sampleFirstName"; // First Name
args['plan_slug'] = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
args['slug'] = "sampleSlug"; // User slug
args['last_name'] = "sampleLastName"; // Last Name
args['image_download_url'] = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
args['instagram'] = "sampleInstagram"; // instagram URL or slug
args['facebook'] = "sampleFacebook"; // facebook URL or slug
args['website'] = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
args['twitter'] = "sampleTwitter"; // twitter URL or slug
args['description'] = "sampleDescription"; // User profile description
swagger.Web.authUpdateUser(args, function(response) {
/* success callback */
console.log("Result of Web.authUpdateUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authUpdateUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *closestLocation = @"sampleClosestLocation"; // Update users closest location with the slug of the...
NSString *email = @"sampleEmail"; // email address in which the user logs in as
NSString *password = @"samplePassword"; // password
NSString *firstName = @"sampleFirstName"; // First Name
NSString *planSlug = @"samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
NSString *slug = @"sampleSlug"; // User slug
NSString *lastName = @"sampleLastName"; // Last Name
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // URL On the web to download and assign to profile
NSString *instagram = @"sampleInstagram"; // instagram URL or slug
NSString *facebook = @"sampleFacebook"; // facebook URL or slug
NSString *website = @"sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
NSString *twitter = @"sampleTwitter"; // twitter URL or slug
NSString *description = @"sampleDescription"; // User profile description
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authUpdateUserWithCompletionBlock:pk
closestLocation:closestLocation
email:email
password:password
firstName:firstName
planSlug:planSlug
slug:slug
lastName:lastName
imageDownloadUrl:imageDownloadUrl
instagram:instagram
facebook:facebook
website:website
twitter:twitter
description:description
completionHandler:^(SWGActiveUserSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$closestLocation = "sampleClosestLocation"; // Update users closest location with the slug of the...
$email = "sampleEmail"; // email address in which the user logs in as
$password = "samplePassword"; // password
$firstName = "sampleFirstName"; // First Name
$planSlug = "samplePlanSlug"; // Must be either pro_trial, pro or free of what type of...
$slug = "sampleSlug"; // User slug
$lastName = "sampleLastName"; // Last Name
$imageDownloadUrl = "sampleImageDownloadUrl"; // URL On the web to download and assign to profile
$instagram = "sampleInstagram"; // instagram URL or slug
$facebook = "sampleFacebook"; // facebook URL or slug
$website = "sampleWebsite"; // website URL - FYI all schemes will be stripped and you...
$twitter = "sampleTwitter"; // twitter URL or slug
$description = "sampleDescription"; // User profile description
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ActiveUserSerializer (model)
$response = $web_api->authUpdateUser($pk, $closestLocation, $email, $password, $firstName, $planSlug, $slug, $lastName, $imageDownloadUrl, $instagram, $facebook, $website, $twitter, $description);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ActiveUserSerializer (model)
response = web_api.auth_update_user(pk, closest_location="sample_closest_location", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description")
pprint(response)
# asynchronous call
# thread = web_api.auth_update_user(pk, closest_location="sample_closest_location", email="sample_email", password="sample_password", first_name="sample_first_name", plan_slug="sample_plan_slug", slug="sample_slug", last_name="sample_last_name", image_download_url="sample_image_download_url", instagram="sample_instagram", facebook="sample_facebook", website="sample_website", twitter="sample_twitter", description="sample_description", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ActiveUserSerializer (model)
response = web_api.auth_update_user(pk, :closest_location => "sample_closest_location", :email => "sample_email", :password => "sample_password", :first_name => "sample_first_name", :plan_slug => "sample_plan_slug", :slug => "sample_slug", :last_name => "sample_last_name", :image_download_url => "sample_image_download_url", :instagram => "sample_instagram", :facebook => "sample_facebook", :website => "sample_website", :twitter => "sample_twitter", :description => "sample_description")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val closestLocation = "sampleClosestLocation" // Update users closest location with the slug of the...
val email = "sampleEmail" // email address in which the user logs in as
val password = "samplePassword" // password
val firstName = "sampleFirstName" // First Name
val planSlug = "samplePlanSlug" // Must be either pro_trial, pro or free of what type of...
val slug = "sampleSlug" // User slug
val lastName = "sampleLastName" // Last Name
val imageDownloadUrl = "sampleImageDownloadUrl" // URL On the web to download and assign to profile
val instagram = "sampleInstagram" // instagram URL or slug
val facebook = "sampleFacebook" // facebook URL or slug
val website = "sampleWebsite" // website URL - FYI all schemes will be stripped and you...
val twitter = "sampleTwitter" // twitter URL or slug
val description = "sampleDescription" // User profile description
try {
val webApi = new WebApi
val response = webApi.authUpdateUser(pk, closestLocation, email, password, firstName, planSlug, slug, lastName, imageDownloadUrl, instagram, facebook, website, twitter, description)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authViewArtistUser
View artist user data (with options like favorites, following etc etc)
POST http://devcms.djs.com/api/auth/:pk/view-artist-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. View artist user data (with options like favorites, following etc etc)
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| with_favorites | String | HTTP Form | Fetch favorites the "favorites" index. | |
| favorite_page | String | HTTP Form | Paginate through more favorites by increasing by one. Starting at index of 2 because you get your first page on initial "with_favorites" request | |
| favorite_per_page | String | HTTP Form | How many per page you would like (Default is 16 favorites) | |
| with_following | String | HTTP Form | Fetch favorites the "following" index. | |
| following_page | String | HTTP Form | Paginate through more following djs by increasing by one. Starting at index of 2 because you get your first page on initial "with_following" request | |
| following_per_page | String | HTTP Form | How many per page you would like (Default is 16 following) | |
| with_following_users | String | HTTP Form | Fetch favorites the "following_users" index. | |
| following_users_page | String | HTTP Form | Paginate through more following users by increasing by one. Starting at index of 2 because you get your first page on initial "with_following_users" request | |
| following_users_per_page | String | HTTP Form | How many per page you would like (Default is 16 following) | |
| with_followers | String | HTTP Form | Fetch favorites the "followers" index. | |
| followers_page | String | HTTP Form | Paginate through more follower users by increasing by one. Starting at index of 2 because you get your first page on initial "with_followers" request | |
| followers_per_page | String | HTTP Form | How many per page you would like (Default is 16 followers) | |
| with_artist_followers | String | HTTP Form | Fetch djs who are followers in the "artist_followers" index. | |
| artist_followers_page | String | HTTP Form | Paginate through more follower djs by increasing by one. Starting at index of 2 because you get your first page on initial "with_artist_followers" request | |
| artist_followers_per_page | String | HTTP Form | How many per page you would like (Default is 16 artist_followers) |
Request preview:
POST /api/auth/PK/view-artist-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
artist_followers_page=ARTIST_FOLLOWERS_PAGE&artist_followers_per_page=ARTIST_FOLLOWERS_PER_PAGE&favorite_page=FAVORITE_PAGE&favorite_per_page=FAVORITE_PER_PAGE&followers_page=FOLLOWERS_PAGE&followers_per_page=FOLLOWERS_PER_PAGE&following_page=FOLLOWING_PAGE&following_per_page=FOLLOWING_PER_PAGE&following_users_page=FOLLOWING_USERS_PAGE&following_users_per_page=FOLLOWING_USERS_PER_PAGE&with_artist_followers=WITH_ARTIST_FOLLOWERS&with_favorites=WITH_FAVORITES&with_followers=WITH_FOLLOWERS&with_following=WITH_FOLLOWING&with_following_users=WITH_FOLLOWING_USERSThis endpoint returns ActiveArtistSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var withFavorites: String = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
var favoritePage: String = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
var favoritePerPage: String = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
var withFollowing: String = "sampleWithFollowing"; // Fetch favorites the "following" index.
var followingPage: String = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
var followingPerPage: String = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
var withFollowingUsers: String = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
var followingUsersPage: String = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
var followingUsersPerPage: String = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
var withFollowers: String = "sampleWithFollowers"; // Fetch favorites the "followers" index.
var followersPage: String = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
var followersPerPage: String = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
var withArtistFollowers: String = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
var artistFollowersPage: String = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
var artistFollowersPerPage: String = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
var webApi: WebApi = new WebApi();
var response: ActiveArtistSerializer = webApi.auth_view_artist_user(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/<pk>/view-artist-user/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "with_favorites=<with_favorites>" \
-d "favorite_page=<favorite_page>" \
-d "favorite_per_page=<favorite_per_page>" \
-d "with_following=<with_following>" \
-d "following_page=<following_page>" \
-d "following_per_page=<following_per_page>" \
-d "with_following_users=<with_following_users>" \
-d "following_users_page=<following_users_page>" \
-d "following_users_per_page=<following_users_per_page>" \
-d "with_followers=<with_followers>" \
-d "followers_page=<followers_page>" \
-d "followers_per_page=<followers_per_page>" \
-d "with_artist_followers=<with_artist_followers>" \
-d "artist_followers_page=<artist_followers_page>" \
-d "artist_followers_per_page=<artist_followers_per_page>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveArtistSerializer response = webApi.AuthViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveArtistSerializer response = webApi.authViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['with_favorites'] = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
args['favorite_page'] = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
args['favorite_per_page'] = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
args['with_following'] = "sampleWithFollowing"; // Fetch favorites the "following" index.
args['following_page'] = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
args['following_per_page'] = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
args['with_following_users'] = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
args['following_users_page'] = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
args['following_users_per_page'] = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_artist_followers'] = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
args['artist_followers_page'] = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
args['artist_followers_per_page'] = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
swagger.Web.authViewArtistUser(args, function(response) {
/* success callback */
console.log("Result of Web.authViewArtistUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authViewArtistUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *withFavorites = @"sampleWithFavorites"; // Fetch favorites the "favorites" index.
NSString *favoritePage = @"sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
NSString *favoritePerPage = @"sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
NSString *withFollowing = @"sampleWithFollowing"; // Fetch favorites the "following" index.
NSString *followingPage = @"sampleFollowingPage"; // Paginate through more following djs by increasing by one....
NSString *followingPerPage = @"sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowingUsers = @"sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
NSString *followingUsersPage = @"sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
NSString *followingUsersPerPage = @"sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withArtistFollowers = @"sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
NSString *artistFollowersPage = @"sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
NSString *artistFollowersPerPage = @"sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authViewArtistUserWithCompletionBlock:pk
withFavorites:withFavorites
favoritePage:favoritePage
favoritePerPage:favoritePerPage
withFollowing:withFollowing
followingPage:followingPage
followingPerPage:followingPerPage
withFollowingUsers:withFollowingUsers
followingUsersPage:followingUsersPage
followingUsersPerPage:followingUsersPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withArtistFollowers:withArtistFollowers
artistFollowersPage:artistFollowersPage
artistFollowersPerPage:artistFollowersPerPage
completionHandler:^(SWGActiveArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
$favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
$favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
$withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
$followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
$followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
$withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
$followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
$followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
$artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
$artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ActiveArtistSerializer (model)
$response = $web_api->authViewArtistUser($pk, $withFavorites, $favoritePage, $favoritePerPage, $withFollowing, $followingPage, $followingPerPage, $withFollowingUsers, $followingUsersPage, $followingUsersPerPage, $withFollowers, $followersPage, $followersPerPage, $withArtistFollowers, $artistFollowersPage, $artistFollowersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ActiveArtistSerializer (model)
response = web_api.auth_view_artist_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page")
pprint(response)
# asynchronous call
# thread = web_api.auth_view_artist_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ActiveArtistSerializer (model)
response = web_api.auth_view_artist_user(pk, :with_favorites => "sample_with_favorites", :favorite_page => "sample_favorite_page", :favorite_per_page => "sample_favorite_per_page", :with_following => "sample_with_following", :following_page => "sample_following_page", :following_per_page => "sample_following_per_page", :with_following_users => "sample_with_following_users", :following_users_page => "sample_following_users_page", :following_users_per_page => "sample_following_users_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_artist_followers => "sample_with_artist_followers", :artist_followers_page => "sample_artist_followers_page", :artist_followers_per_page => "sample_artist_followers_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val withFavorites = "sampleWithFavorites" // Fetch favorites the "favorites" index.
val favoritePage = "sampleFavoritePage" // Paginate through more favorites by increasing by one. ...
val favoritePerPage = "sampleFavoritePerPage" // How many per page you would like (Default is 16 favorites)
val withFollowing = "sampleWithFollowing" // Fetch favorites the "following" index.
val followingPage = "sampleFollowingPage" // Paginate through more following djs by increasing by one....
val followingPerPage = "sampleFollowingPerPage" // How many per page you would like (Default is 16 following)
val withFollowingUsers = "sampleWithFollowingUsers" // Fetch favorites the "following_users" index.
val followingUsersPage = "sampleFollowingUsersPage" // Paginate through more following users by increasing by...
val followingUsersPerPage = "sampleFollowingUsersPerPage" // How many per page you would like (Default is 16 following)
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withArtistFollowers = "sampleWithArtistFollowers" // Fetch djs who are followers in the "artist_followers" index.
val artistFollowersPage = "sampleArtistFollowersPage" // Paginate through more follower djs by increasing by one. ...
val artistFollowersPerPage = "sampleArtistFollowersPerPage" // How many per page you would like (Default is 16...
try {
val webApi = new WebApi
val response = webApi.authViewArtistUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
authViewUser
View user data (with options like favorites, following etc etc)
POST http://devcms.djs.com/api/auth/:pk/view-user/
Shows the current authentication/permissions of the API key or session auth in use. Shows which end-user has been logged in via the API. Allows logging in end users, generating an access token. View user data (with options like favorites, following etc etc)
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| with_favorites | String | HTTP Form | Fetch favorites the "favorites" index. | |
| favorite_page | String | HTTP Form | Paginate through more favorites by increasing by one. Starting at index of 2 because you get your first page on initial "with_favorites" request | |
| favorite_per_page | String | HTTP Form | How many per page you would like (Default is 16 favorites) | |
| with_following | String | HTTP Form | Fetch favorites the "following" index. | |
| following_page | String | HTTP Form | Paginate through more following djs by increasing by one. Starting at index of 2 because you get your first page on initial "with_following" request | |
| following_per_page | String | HTTP Form | How many per page you would like (Default is 16 following) | |
| with_following_users | String | HTTP Form | Fetch favorites the "following_users" index. | |
| following_users_page | String | HTTP Form | Paginate through more following users by increasing by one. Starting at index of 2 because you get your first page on initial "with_following_users" request | |
| following_users_per_page | String | HTTP Form | How many per page you would like (Default is 16 following) | |
| with_followers | String | HTTP Form | Fetch favorites the "followers" index. | |
| followers_page | String | HTTP Form | Paginate through more follower users by increasing by one. Starting at index of 2 because you get your first page on initial "with_followers" request | |
| followers_per_page | String | HTTP Form | How many per page you would like (Default is 16 followers) | |
| with_artist_followers | String | HTTP Form | Fetch djs who are followers in the "artist_followers" index. | |
| artist_followers_page | String | HTTP Form | Paginate through more follower djs by increasing by one. Starting at index of 2 because you get your first page on initial "with_artist_followers" request | |
| artist_followers_per_page | String | HTTP Form | How many per page you would like (Default is 16 artist_followers) |
Request preview:
POST /api/auth/PK/view-user/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
artist_followers_page=ARTIST_FOLLOWERS_PAGE&artist_followers_per_page=ARTIST_FOLLOWERS_PER_PAGE&favorite_page=FAVORITE_PAGE&favorite_per_page=FAVORITE_PER_PAGE&followers_page=FOLLOWERS_PAGE&followers_per_page=FOLLOWERS_PER_PAGE&following_page=FOLLOWING_PAGE&following_per_page=FOLLOWING_PER_PAGE&following_users_page=FOLLOWING_USERS_PAGE&following_users_per_page=FOLLOWING_USERS_PER_PAGE&with_artist_followers=WITH_ARTIST_FOLLOWERS&with_favorites=WITH_FAVORITES&with_followers=WITH_FOLLOWERS&with_following=WITH_FOLLOWING&with_following_users=WITH_FOLLOWING_USERSThis endpoint returns ActiveUserSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var withFavorites: String = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
var favoritePage: String = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
var favoritePerPage: String = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
var withFollowing: String = "sampleWithFollowing"; // Fetch favorites the "following" index.
var followingPage: String = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
var followingPerPage: String = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
var withFollowingUsers: String = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
var followingUsersPage: String = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
var followingUsersPerPage: String = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
var withFollowers: String = "sampleWithFollowers"; // Fetch favorites the "followers" index.
var followersPage: String = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
var followersPerPage: String = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
var withArtistFollowers: String = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
var artistFollowersPage: String = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
var artistFollowersPerPage: String = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
var webApi: WebApi = new WebApi();
var response: ActiveUserSerializer = webApi.auth_view_user(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/auth/<pk>/view-user/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "with_favorites=<with_favorites>" \
-d "favorite_page=<favorite_page>" \
-d "favorite_per_page=<favorite_per_page>" \
-d "with_following=<with_following>" \
-d "following_page=<following_page>" \
-d "following_per_page=<following_per_page>" \
-d "with_following_users=<with_following_users>" \
-d "following_users_page=<following_users_page>" \
-d "following_users_per_page=<following_users_per_page>" \
-d "with_followers=<with_followers>" \
-d "followers_page=<followers_page>" \
-d "followers_per_page=<followers_per_page>" \
-d "with_artist_followers=<with_artist_followers>" \
-d "artist_followers_page=<artist_followers_page>" \
-d "artist_followers_per_page=<artist_followers_per_page>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ActiveUserSerializer response = webApi.AuthViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
String favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
String favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
String withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
String followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
String followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
String withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
String followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
String followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
String withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
String followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
String followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
String withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
String artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
String artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
WebApi webApi = new WebApi();
ActiveUserSerializer response = webApi.authViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['with_favorites'] = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
args['favorite_page'] = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
args['favorite_per_page'] = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
args['with_following'] = "sampleWithFollowing"; // Fetch favorites the "following" index.
args['following_page'] = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
args['following_per_page'] = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
args['with_following_users'] = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
args['following_users_page'] = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
args['following_users_per_page'] = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
args['with_followers'] = "sampleWithFollowers"; // Fetch favorites the "followers" index.
args['followers_page'] = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
args['followers_per_page'] = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
args['with_artist_followers'] = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
args['artist_followers_page'] = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
args['artist_followers_per_page'] = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
swagger.Web.authViewUser(args, function(response) {
/* success callback */
console.log("Result of Web.authViewUser");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.authViewUser:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *withFavorites = @"sampleWithFavorites"; // Fetch favorites the "favorites" index.
NSString *favoritePage = @"sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
NSString *favoritePerPage = @"sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
NSString *withFollowing = @"sampleWithFollowing"; // Fetch favorites the "following" index.
NSString *followingPage = @"sampleFollowingPage"; // Paginate through more following djs by increasing by one....
NSString *followingPerPage = @"sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowingUsers = @"sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
NSString *followingUsersPage = @"sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
NSString *followingUsersPerPage = @"sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
NSString *withFollowers = @"sampleWithFollowers"; // Fetch favorites the "followers" index.
NSString *followersPage = @"sampleFollowersPage"; // Paginate through more follower users by increasing by...
NSString *followersPerPage = @"sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
NSString *withArtistFollowers = @"sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
NSString *artistFollowersPage = @"sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
NSString *artistFollowersPerPage = @"sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi authViewUserWithCompletionBlock:pk
withFavorites:withFavorites
favoritePage:favoritePage
favoritePerPage:favoritePerPage
withFollowing:withFollowing
followingPage:followingPage
followingPerPage:followingPerPage
withFollowingUsers:withFollowingUsers
followingUsersPage:followingUsersPage
followingUsersPerPage:followingUsersPerPage
withFollowers:withFollowers
followersPage:followersPage
followersPerPage:followersPerPage
withArtistFollowers:withArtistFollowers
artistFollowersPage:artistFollowersPage
artistFollowersPerPage:artistFollowersPerPage
completionHandler:^(SWGActiveUserSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withFavorites = "sampleWithFavorites"; // Fetch favorites the "favorites" index.
$favoritePage = "sampleFavoritePage"; // Paginate through more favorites by increasing by one. ...
$favoritePerPage = "sampleFavoritePerPage"; // How many per page you would like (Default is 16 favorites)
$withFollowing = "sampleWithFollowing"; // Fetch favorites the "following" index.
$followingPage = "sampleFollowingPage"; // Paginate through more following djs by increasing by one....
$followingPerPage = "sampleFollowingPerPage"; // How many per page you would like (Default is 16 following)
$withFollowingUsers = "sampleWithFollowingUsers"; // Fetch favorites the "following_users" index.
$followingUsersPage = "sampleFollowingUsersPage"; // Paginate through more following users by increasing by...
$followingUsersPerPage = "sampleFollowingUsersPerPage"; // How many per page you would like (Default is 16 following)
$withFollowers = "sampleWithFollowers"; // Fetch favorites the "followers" index.
$followersPage = "sampleFollowersPage"; // Paginate through more follower users by increasing by...
$followersPerPage = "sampleFollowersPerPage"; // How many per page you would like (Default is 16 followers)
$withArtistFollowers = "sampleWithArtistFollowers"; // Fetch djs who are followers in the "artist_followers" index.
$artistFollowersPage = "sampleArtistFollowersPage"; // Paginate through more follower djs by increasing by one. ...
$artistFollowersPerPage = "sampleArtistFollowersPerPage"; // How many per page you would like (Default is 16...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ActiveUserSerializer (model)
$response = $web_api->authViewUser($pk, $withFavorites, $favoritePage, $favoritePerPage, $withFollowing, $followingPage, $followingPerPage, $withFollowingUsers, $followingUsersPage, $followingUsersPerPage, $withFollowers, $followersPage, $followersPerPage, $withArtistFollowers, $artistFollowersPage, $artistFollowersPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ActiveUserSerializer (model)
response = web_api.auth_view_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page")
pprint(response)
# asynchronous call
# thread = web_api.auth_view_user(pk, with_favorites="sample_with_favorites", favorite_page="sample_favorite_page", favorite_per_page="sample_favorite_per_page", with_following="sample_with_following", following_page="sample_following_page", following_per_page="sample_following_per_page", with_following_users="sample_with_following_users", following_users_page="sample_following_users_page", following_users_per_page="sample_following_users_per_page", with_followers="sample_with_followers", followers_page="sample_followers_page", followers_per_page="sample_followers_per_page", with_artist_followers="sample_with_artist_followers", artist_followers_page="sample_artist_followers_page", artist_followers_per_page="sample_artist_followers_per_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return ActiveUserSerializer (model)
response = web_api.auth_view_user(pk, :with_favorites => "sample_with_favorites", :favorite_page => "sample_favorite_page", :favorite_per_page => "sample_favorite_per_page", :with_following => "sample_with_following", :following_page => "sample_following_page", :following_per_page => "sample_following_per_page", :with_following_users => "sample_with_following_users", :following_users_page => "sample_following_users_page", :following_users_per_page => "sample_following_users_per_page", :with_followers => "sample_with_followers", :followers_page => "sample_followers_page", :followers_per_page => "sample_followers_per_page", :with_artist_followers => "sample_with_artist_followers", :artist_followers_page => "sample_artist_followers_page", :artist_followers_per_page => "sample_artist_followers_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val withFavorites = "sampleWithFavorites" // Fetch favorites the "favorites" index.
val favoritePage = "sampleFavoritePage" // Paginate through more favorites by increasing by one. ...
val favoritePerPage = "sampleFavoritePerPage" // How many per page you would like (Default is 16 favorites)
val withFollowing = "sampleWithFollowing" // Fetch favorites the "following" index.
val followingPage = "sampleFollowingPage" // Paginate through more following djs by increasing by one....
val followingPerPage = "sampleFollowingPerPage" // How many per page you would like (Default is 16 following)
val withFollowingUsers = "sampleWithFollowingUsers" // Fetch favorites the "following_users" index.
val followingUsersPage = "sampleFollowingUsersPage" // Paginate through more following users by increasing by...
val followingUsersPerPage = "sampleFollowingUsersPerPage" // How many per page you would like (Default is 16 following)
val withFollowers = "sampleWithFollowers" // Fetch favorites the "followers" index.
val followersPage = "sampleFollowersPage" // Paginate through more follower users by increasing by...
val followersPerPage = "sampleFollowersPerPage" // How many per page you would like (Default is 16 followers)
val withArtistFollowers = "sampleWithArtistFollowers" // Fetch djs who are followers in the "artist_followers" index.
val artistFollowersPage = "sampleArtistFollowersPage" // Paginate through more follower djs by increasing by one. ...
val artistFollowersPerPage = "sampleArtistFollowersPerPage" // How many per page you would like (Default is 16...
try {
val webApi = new WebApi
val response = webApi.authViewUser(pk, withFavorites, favoritePage, favoritePerPage, withFollowing, followingPage, followingPerPage, withFollowingUsers, followingUsersPage, followingUsersPerPage, withFollowers, followersPage, followersPerPage, withArtistFollowers, artistFollowersPage, artistFollowersPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
contactEntryCreate
Create a new Contact Us Entry
POST http://devcms.djs.com/api/contact_us/
Create a new Contact Us Entry
| Name | Type | Location | Description | |
|---|---|---|---|---|
| name | String | HTTP Form | Contact Name | |
| String | HTTP Form | Contact Email | ||
| comments | String | HTTP Form | Comments | |
| phone | String | HTTP Form | Contact Phone |
Request preview:
POST /api/contact_us/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
comments=COMMENTS&email=EMAIL&name=NAME&phone=PHONEThis endpoint returns ContactEntryChangeRecordSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 402 | MAIL_CHIMP_ERROR |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var name: String = "sampleName"; // Contact Name
var email: String = "sampleEmail"; // Contact Email
var comments: String = "sampleComments"; // Comments
var phone: String = "samplePhone"; // Contact Phone
try
{
var webApi: WebApi = new WebApi();
var response: ContactEntryChangeRecordSerializer = webApi.contact_entry_create(name, email, comments, phone);
}
catch (e:Error)
{
trace(e)
}
String name = "sampleName"; // Contact Name
String email = "sampleEmail"; // Contact Email
String comments = "sampleComments"; // Comments
String phone = "samplePhone"; // Contact Phone
try {
WebApi webApi = new WebApi();
ContactEntryChangeRecordSerializer response = webApi.contactEntryCreate(name, email, comments, phone);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/contact_us/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "name=<name>" \
-d "email=<email>" \
-d "comments=<comments>" \
-d "phone=<phone>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String name = "sampleName"; // Contact Name
String email = "sampleEmail"; // Contact Email
String comments = "sampleComments"; // Comments
String phone = "samplePhone"; // Contact Phone
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
ContactEntryChangeRecordSerializer response = webApi.ContactEntryCreate(name, email, comments, phone);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String name = "sampleName"; // Contact Name
String email = "sampleEmail"; // Contact Email
String comments = "sampleComments"; // Comments
String phone = "samplePhone"; // Contact Phone
try {
WebApi webApi = new WebApi();
ContactEntryChangeRecordSerializer response = webApi.contactEntryCreate(name, email, comments, phone);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['name'] = "sampleName"; // Contact Name
args['email'] = "sampleEmail"; // Contact Email
args['comments'] = "sampleComments"; // Comments
args['phone'] = "samplePhone"; // Contact Phone
swagger.Web.contactEntryCreate(args, function(response) {
/* success callback */
console.log("Result of Web.contactEntryCreate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.contactEntryCreate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *name = @"sampleName"; // Contact Name
NSString *email = @"sampleEmail"; // Contact Email
NSString *comments = @"sampleComments"; // Comments
NSString *phone = @"samplePhone"; // Contact Phone
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi contactEntryCreateWithCompletionBlock:name
email:email
comments:comments
phone:phone
completionHandler:^(SWGContactEntryChangeRecordSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$name = "sampleName"; // Contact Name
$email = "sampleEmail"; // Contact Email
$comments = "sampleComments"; // Comments
$phone = "samplePhone"; // Contact Phone
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return ContactEntryChangeRecordSerializer (model)
$response = $web_api->contactEntryCreate($name, $email, $comments, $phone);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
name = "sample_name" # Contact Name
email = "sample_email" # Contact Email
comments = "sample_comments" # Comments
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return ContactEntryChangeRecordSerializer (model)
response = web_api.contact_entry_create(name, email, comments, phone="sample_phone")
pprint(response)
# asynchronous call
# thread = web_api.contact_entry_create(name, email, comments, phone="sample_phone", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
name = "sample_name" # Contact Name
email = "sample_email" # Contact Email
comments = "sample_comments" # Comments
begin
web_api = DjsApi::WebApi.new
# return ContactEntryChangeRecordSerializer (model)
response = web_api.contact_entry_create(name, email, comments, :phone => "sample_phone")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val name = "sampleName" // Contact Name
val email = "sampleEmail" // Contact Email
val comments = "sampleComments" // Comments
val phone = "samplePhone" // Contact Phone
try {
val webApi = new WebApi
val response = webApi.contactEntryCreate(name, email, comments, phone)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
countryList
List all Countries
GET http://devcms.djs.com/api/countries/
List all Countries
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) |
Request preview:
GET /api/countries/?page=PAGE&per_page=PER_PAGE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns CountryPaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
try
{
var webApi: WebApi = new WebApi();
var response: CountryPaginationSerializer = webApi.country_list(page, perPage);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try {
WebApi webApi = new WebApi();
CountryPaginationSerializer response = webApi.countryList(page, perPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/countries/?page=<page>&per_page=<per_page>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
CountryPaginationSerializer response = webApi.CountryList(page, perPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try {
WebApi webApi = new WebApi();
CountryPaginationSerializer response = webApi.countryList(page, perPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
swagger.Web.countryList(args, function(response) {
/* success callback */
console.log("Result of Web.countryList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.countryList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi countryListWithCompletionBlock:page
perPage:perPage
completionHandler:^(SWGCountryPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return CountryPaginationSerializer (model)
$response = $web_api->countryList($page, $perPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return CountryPaginationSerializer (model)
response = web_api.country_list(page="sample_page", per_page="sample_per_page")
pprint(response)
# asynchronous call
# thread = web_api.country_list(page="sample_page", per_page="sample_per_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return CountryPaginationSerializer (model)
response = web_api.country_list(:page => "sample_page", :per_page => "sample_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
try {
val webApi = new WebApi
val response = webApi.countryList(page, perPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
countryRetrieve
Fetch a single Country by ID
GET http://devcms.djs.com/api/countries/:pk/
Fetch a single Country by ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/countries/PK/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns CountrySerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: CountrySerializer = webApi.country_retrieve(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
CountrySerializer response = webApi.countryRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/countries/<pk>/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
CountrySerializer response = webApi.CountryRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
CountrySerializer response = webApi.countryRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.countryRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.countryRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.countryRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi countryRetrieveWithCompletionBlock:pk
completionHandler:^(SWGCountrySerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return CountrySerializer (model)
$response = $web_api->countryRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return CountrySerializer (model)
response = web_api.country_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.country_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return CountrySerializer (model)
response = web_api.country_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.countryRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
djTierGet
Get Various lists of djs for initial render of page
GET http://devcms.djs.com/api/djs/
Get Various lists of djs for initial render of page
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | How many results to be returned in each category | |
| genre | String | URL query string | Which genre key to filter on | |
| genre_id | String | URL query string | Which genre id/pk to filter on |
Request preview:
GET /api/djs/?page=PAGE&genre=GENRE&genre_id=GENRE_ID HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns DjTierSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // How many results to be returned in each category
var genre: String = "sampleGenre"; // Which genre key to filter on
var genreId: String = "sampleGenreId"; // Which genre id/pk to filter on
try
{
var webApi: WebApi = new WebApi();
var response: DjTierSerializer = webApi.dj_tier_get(page, genre, genreId);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // How many results to be returned in each category
String genre = "sampleGenre"; // Which genre key to filter on
String genreId = "sampleGenreId"; // Which genre id/pk to filter on
try {
WebApi webApi = new WebApi();
DjTierSerializer response = webApi.djTierGet(page, genre, genreId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/djs/?page=<page>&genre=<genre>&genre_id=<genre_id>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // How many results to be returned in each category
String genre = "sampleGenre"; // Which genre key to filter on
String genreId = "sampleGenreId"; // Which genre id/pk to filter on
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
DjTierSerializer response = webApi.DjTierGet(page, genre, genreId);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // How many results to be returned in each category
String genre = "sampleGenre"; // Which genre key to filter on
String genreId = "sampleGenreId"; // Which genre id/pk to filter on
try {
WebApi webApi = new WebApi();
DjTierSerializer response = webApi.djTierGet(page, genre, genreId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // How many results to be returned in each category
args['genre'] = "sampleGenre"; // Which genre key to filter on
args['genre_id'] = "sampleGenreId"; // Which genre id/pk to filter on
swagger.Web.djTierGet(args, function(response) {
/* success callback */
console.log("Result of Web.djTierGet");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.djTierGet:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // How many results to be returned in each category
NSString *genre = @"sampleGenre"; // Which genre key to filter on
NSString *genreId = @"sampleGenreId"; // Which genre id/pk to filter on
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi djTierGetWithCompletionBlock:page
genre:genre
genreId:genreId
completionHandler:^(SWGDjTierSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // How many results to be returned in each category
$genre = "sampleGenre"; // Which genre key to filter on
$genreId = "sampleGenreId"; // Which genre id/pk to filter on
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return DjTierSerializer (model)
$response = $web_api->djTierGet($page, $genre, $genreId);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return DjTierSerializer (model)
response = web_api.dj_tier_get(page="sample_page", genre="sample_genre", genre_id="sample_genre_id")
pprint(response)
# asynchronous call
# thread = web_api.dj_tier_get(page="sample_page", genre="sample_genre", genre_id="sample_genre_id", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return DjTierSerializer (model)
response = web_api.dj_tier_get(:page => "sample_page", :genre => "sample_genre", :genre_id => "sample_genre_id")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // How many results to be returned in each category
val genre = "sampleGenre" // Which genre key to filter on
val genreId = "sampleGenreId" // Which genre id/pk to filter on
try {
val webApi = new WebApi
val response = webApi.djTierGet(page, genre, genreId)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventArtistList
List all Events
GET http://devcms.djs.com/api/event_artists/
List all Events
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| display_name | String | URL query string | Search by display name of artist |
Request preview:
GET /api/event_artists/?page=PAGE&per_page=PER_PAGE&ordering=ORDERING&display_name=DISPLAY_NAME HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns EventPaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var displayName: String = "sampleDisplayName"; // Search by display name of artist
try
{
var webApi: WebApi = new WebApi();
var response: EventPaginationSerializer = webApi.event_artist_list(page, perPage, ordering, displayName);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String displayName = "sampleDisplayName"; // Search by display name of artist
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventArtistList(page, perPage, ordering, displayName);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/event_artists/?page=<page>&per_page=<per_page>&ordering=<ordering>&display_name=<display_name>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String displayName = "sampleDisplayName"; // Search by display name of artist
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventPaginationSerializer response = webApi.EventArtistList(page, perPage, ordering, displayName);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String displayName = "sampleDisplayName"; // Search by display name of artist
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventArtistList(page, perPage, ordering, displayName);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['display_name'] = "sampleDisplayName"; // Search by display name of artist
swagger.Web.eventArtistList(args, function(response) {
/* success callback */
console.log("Result of Web.eventArtistList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventArtistList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *displayName = @"sampleDisplayName"; // Search by display name of artist
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventArtistListWithCompletionBlock:page
perPage:perPage
ordering:ordering
displayName:displayName
completionHandler:^(SWGEventPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$displayName = "sampleDisplayName"; // Search by display name of artist
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return EventPaginationSerializer (model)
$response = $web_api->eventArtistList($page, $perPage, $ordering, $displayName);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return EventPaginationSerializer (model)
response = web_api.event_artist_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", display_name="sample_display_name")
pprint(response)
# asynchronous call
# thread = web_api.event_artist_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", display_name="sample_display_name", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return EventPaginationSerializer (model)
response = web_api.event_artist_list(:page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :display_name => "sample_display_name")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val displayName = "sampleDisplayName" // Search by display name of artist
try {
val webApi = new WebApi
val response = webApi.eventArtistList(page, perPage, ordering, displayName)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventArtistRetrieve
Fetch a single EventArtist by Slug or ID
GET http://devcms.djs.com/api/event_artists/:pk/
Fetch a single EventArtist by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/event_artists/PK/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns EventArtistSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: EventArtistSerializer = webApi.event_artist_retrieve(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventArtistSerializer response = webApi.eventArtistRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/event_artists/<pk>/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventArtistSerializer response = webApi.EventArtistRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventArtistSerializer response = webApi.eventArtistRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.eventArtistRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.eventArtistRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventArtistRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventArtistRetrieveWithCompletionBlock:pk
completionHandler:^(SWGEventArtistSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return EventArtistSerializer (model)
$response = $web_api->eventArtistRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return EventArtistSerializer (model)
response = web_api.event_artist_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.event_artist_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return EventArtistSerializer (model)
response = web_api.event_artist_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.eventArtistRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventCreateEvent
Creates a new event
POST http://devcms.djs.com/api/events/create-event/
Creates a new event.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| display_name | String | HTTP Form | Event Display Name | |
| uri | String | HTTP Form | URI of the ticket link | |
| image_thumbnail_download_url | String | HTTP Form | A publicly accessible URL so the file can be downloaded and dumped to S3 in the appropriate location | |
| image_jumbotron_download_url | String | HTTP Form | A publicly accessible Jumbotron URL so the file can be downloaded and dumped to S3 in the appropriate location | |
| venue_slug | String | HTTP Form | Slug of the venue | |
| event_date | String | HTTP Form | US Date formatted Date | |
| event_time | String | HTTP Form | Military time of event start | |
| artist_slug | String | HTTP Form | Artist creating this item | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| event_date_start | String (date) | HTTP Form | event_date_start | |
| event_date_end | String (date) | HTTP Form | event_date_end | |
| event_end_time | String | HTTP Form | event_end_time | |
| event_start_time | String | HTTP Form | event_start_time | |
| sk_id | String | HTTP Form | sk_id | |
| event_type | String | HTTP Form | event_type | |
| series_name | String | HTTP Form | series_name | |
| popularity | String | HTTP Form | popularity | |
| age_restriction | String | HTTP Form | age_restriction | |
| disabled | Boolean | HTTP Form | disabled | |
| venue | String | HTTP Form | venue |
Request preview:
POST /api/events/create-event/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
age_restriction=AGE_RESTRICTION&artist_slug=ARTIST_SLUG&disabled=DISABLED&display_name=DISPLAY_NAME&event_date=EVENT_DATE&event_date_end=EVENT_DATE_END&event_date_start=EVENT_DATE_START&event_end_time=EVENT_END_TIME&event_start_time=EVENT_START_TIME&event_time=EVENT_TIME&event_type=EVENT_TYPE&image_jumbotron_download_url=IMAGE_JUMBOTRON_DOWNLOAD_URL&image_thumbnail_download_url=IMAGE_THUMBNAIL_DOWNLOAD_URL&meta_description=META_DESCRIPTION&meta_title=META_TITLE&popularity=POPULARITY&series_name=SERIES_NAME&sk_id=SK_ID&slug=SLUG&uri=URI&venue=VENUE&venue_slug=VENUE_SLUGThis endpoint returns EventSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var displayName: String = "sampleDisplayName"; // Event Display Name
var uri: String = "sampleUri"; // URI of the ticket link
var imageThumbnailDownloadUrl: String = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
var imageJumbotronDownloadUrl: String = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
var venueSlug: String = "sampleVenueSlug"; // Slug of the venue
var eventDate: String = "sampleEventDate"; // US Date formatted Date
var eventTime: String = "sampleEventTime"; // Military time of event start
var artistSlug: String = "sampleArtistSlug"; // Artist creating this item
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var eventDateStart: String = "sampleEventDateStart"; // event_date_start
var eventDateEnd: String = "sampleEventDateEnd"; // event_date_end
var eventEndTime: String = "sampleEventEndTime"; // event_end_time
var eventStartTime: String = "sampleEventStartTime"; // event_start_time
var skId: String = "sampleSkId"; // sk_id
var eventType: String = "sampleEventType"; // event_type
var seriesName: String = "sampleSeriesName"; // series_name
var popularity: String = "samplePopularity"; // popularity
var ageRestriction: String = "sampleAgeRestriction"; // age_restriction
var disabled: Boolean = True; // disabled
var venue: String = "sampleVenue"; // venue
try
{
var webApi: WebApi = new WebApi();
var response: EventSerializer = webApi.event_create_event(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
}
catch (e:Error)
{
trace(e)
}
String displayName = "sampleDisplayName"; // Event Display Name
String uri = "sampleUri"; // URI of the ticket link
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String ageRestriction = "sampleAgeRestriction"; // age_restriction
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/events/create-event/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "display_name=<display_name>" \
-d "uri=<uri>" \
-d "image_thumbnail_download_url=<image_thumbnail_download_url>" \
-d "image_jumbotron_download_url=<image_jumbotron_download_url>" \
-d "venue_slug=<venue_slug>" \
-d "event_date=<event_date>" \
-d "event_time=<event_time>" \
-d "artist_slug=<artist_slug>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "event_date_start=<event_date_start>" \
-d "event_date_end=<event_date_end>" \
-d "event_end_time=<event_end_time>" \
-d "event_start_time=<event_start_time>" \
-d "sk_id=<sk_id>" \
-d "event_type=<event_type>" \
-d "series_name=<series_name>" \
-d "popularity=<popularity>" \
-d "age_restriction=<age_restriction>" \
-d "disabled=<disabled>" \
-d "venue=<venue>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String displayName = "sampleDisplayName"; // Event Display Name
String uri = "sampleUri"; // URI of the ticket link
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
DateTime? eventDateStart = DateTime.Parse("2014-12-31"); // event_date_start
DateTime? eventDateEnd = DateTime.Parse("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String ageRestriction = "sampleAgeRestriction"; // age_restriction
bool? disabled = false; // disabled
String venue = "sampleVenue"; // venue
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventSerializer response = webApi.EventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String displayName = "sampleDisplayName"; // Event Display Name
String uri = "sampleUri"; // URI of the ticket link
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String ageRestriction = "sampleAgeRestriction"; // age_restriction
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['display_name'] = "sampleDisplayName"; // Event Display Name
args['uri'] = "sampleUri"; // URI of the ticket link
args['image_thumbnail_download_url'] = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['image_jumbotron_download_url'] = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
args['venue_slug'] = "sampleVenueSlug"; // Slug of the venue
args['event_date'] = "sampleEventDate"; // US Date formatted Date
args['event_time'] = "sampleEventTime"; // Military time of event start
args['artist_slug'] = "sampleArtistSlug"; // Artist creating this item
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['event_date_start'] = "2014-12-31"; // event_date_start
args['event_date_end'] = "2014-12-31"; // event_date_end
args['event_end_time'] = "sampleEventEndTime"; // event_end_time
args['event_start_time'] = "sampleEventStartTime"; // event_start_time
args['sk_id'] = "sampleSkId"; // sk_id
args['event_type'] = "sampleEventType"; // event_type
args['series_name'] = "sampleSeriesName"; // series_name
args['popularity'] = "samplePopularity"; // popularity
args['age_restriction'] = "sampleAgeRestriction"; // age_restriction
args['disabled'] = false; // disabled
args['venue'] = "sampleVenue"; // venue
swagger.Web.eventCreateEvent(args, function(response) {
/* success callback */
console.log("Result of Web.eventCreateEvent");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventCreateEvent:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *displayName = @"sampleDisplayName"; // Event Display Name
NSString *uri = @"sampleUri"; // URI of the ticket link
NSString *imageThumbnailDownloadUrl = @"sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *imageJumbotronDownloadUrl = @"sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
NSString *venueSlug = @"sampleVenueSlug"; // Slug of the venue
NSString *eventDate = @"sampleEventDate"; // US Date formatted Date
NSString *eventTime = @"sampleEventTime"; // Military time of event start
NSString *artistSlug = @"sampleArtistSlug"; // Artist creating this item
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSDate *eventDateStart = @"sampleEventDateStart"; // event_date_start
NSDate *eventDateEnd = @"sampleEventDateEnd"; // event_date_end
NSString *eventEndTime = @"sampleEventEndTime"; // event_end_time
NSString *eventStartTime = @"sampleEventStartTime"; // event_start_time
NSString *skId = @"sampleSkId"; // sk_id
NSString *eventType = @"sampleEventType"; // event_type
NSString *seriesName = @"sampleSeriesName"; // series_name
NSString *popularity = @"samplePopularity"; // popularity
NSString *ageRestriction = @"sampleAgeRestriction"; // age_restriction
NSNumber *disabled = @NO; // disabled
NSString *venue = @"sampleVenue"; // venue
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventCreateEventWithCompletionBlock:displayName
uri:uri
imageThumbnailDownloadUrl:imageThumbnailDownloadUrl
imageJumbotronDownloadUrl:imageJumbotronDownloadUrl
venueSlug:venueSlug
eventDate:eventDate
eventTime:eventTime
artistSlug:artistSlug
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
eventDateStart:eventDateStart
eventDateEnd:eventDateEnd
eventEndTime:eventEndTime
eventStartTime:eventStartTime
skId:skId
eventType:eventType
seriesName:seriesName
popularity:popularity
ageRestriction:ageRestriction
disabled:disabled
venue:venue
completionHandler:^(SWGEventSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$displayName = "sampleDisplayName"; // Event Display Name
$uri = "sampleUri"; // URI of the ticket link
$imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
$venueSlug = "sampleVenueSlug"; // Slug of the venue
$eventDate = "sampleEventDate"; // US Date formatted Date
$eventTime = "sampleEventTime"; // Military time of event start
$artistSlug = "sampleArtistSlug"; // Artist creating this item
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$eventDateStart = "sampleEventDateStart"; // event_date_start
$eventDateEnd = "sampleEventDateEnd"; // event_date_end
$eventEndTime = "sampleEventEndTime"; // event_end_time
$eventStartTime = "sampleEventStartTime"; // event_start_time
$skId = "sampleSkId"; // sk_id
$eventType = "sampleEventType"; // event_type
$seriesName = "sampleSeriesName"; // series_name
$popularity = "samplePopularity"; // popularity
$ageRestriction = "sampleAgeRestriction"; // age_restriction
$disabled = False; // disabled
$venue = "sampleVenue"; // venue
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return EventSerializer (model)
$response = $web_api->eventCreateEvent($displayName, $uri, $imageThumbnailDownloadUrl, $imageJumbotronDownloadUrl, $venueSlug, $eventDate, $eventTime, $artistSlug, $metaTitle, $metaDescription, $slug, $eventDateStart, $eventDateEnd, $eventEndTime, $eventStartTime, $skId, $eventType, $seriesName, $popularity, $ageRestriction, $disabled, $venue);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
display_name = "sample_display_name" # Event Display Name
uri = "sample_uri" # URI of the ticket link
image_thumbnail_download_url = "sample_image_thumbnail_download_url" # A publicly accessible URL so the file can be downloaded...
image_jumbotron_download_url = "sample_image_jumbotron_download_url" # A publicly accessible Jumbotron URL so the file can be...
venue_slug = "sample_venue_slug" # Slug of the venue
event_date = "sample_event_date" # US Date formatted Date
event_time = "sample_event_time" # Military time of event start
artist_slug = "sample_artist_slug" # Artist creating this item
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return EventSerializer (model)
response = web_api.event_create_event(display_name, uri, image_thumbnail_download_url, image_jumbotron_download_url, venue_slug, event_date, event_time, artist_slug, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", series_name="sample_series_name", popularity="sample_popularity", age_restriction="sample_age_restriction", disabled=False, venue="sample_venue")
pprint(response)
# asynchronous call
# thread = web_api.event_create_event(display_name, uri, image_thumbnail_download_url, image_jumbotron_download_url, venue_slug, event_date, event_time, artist_slug, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", series_name="sample_series_name", popularity="sample_popularity", age_restriction="sample_age_restriction", disabled=False, venue="sample_venue", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
display_name = "sample_display_name" # Event Display Name
uri = "sample_uri" # URI of the ticket link
image_thumbnail_download_url = "sample_image_thumbnail_download_url" # A publicly accessible URL so the file can be downloaded...
image_jumbotron_download_url = "sample_image_jumbotron_download_url" # A publicly accessible Jumbotron URL so the file can be...
venue_slug = "sample_venue_slug" # Slug of the venue
event_date = "sample_event_date" # US Date formatted Date
event_time = "sample_event_time" # Military time of event start
artist_slug = "sample_artist_slug" # Artist creating this item
begin
web_api = DjsApi::WebApi.new
# return EventSerializer (model)
response = web_api.event_create_event(display_name, uri, image_thumbnail_download_url, image_jumbotron_download_url, venue_slug, event_date, event_time, artist_slug, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :event_date_start => "2014-12-31", :event_date_end => "2014-12-31", :event_end_time => "sample_event_end_time", :event_start_time => "sample_event_start_time", :sk_id => "sample_sk_id", :event_type => "sample_event_type", :series_name => "sample_series_name", :popularity => "sample_popularity", :age_restriction => "sample_age_restriction", :disabled => false, :venue => "sample_venue")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val displayName = "sampleDisplayName" // Event Display Name
val uri = "sampleUri" // URI of the ticket link
val imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl" // A publicly accessible Jumbotron URL so the file can be...
val venueSlug = "sampleVenueSlug" // Slug of the venue
val eventDate = "sampleEventDate" // US Date formatted Date
val eventTime = "sampleEventTime" // Military time of event start
val artistSlug = "sampleArtistSlug" // Artist creating this item
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val eventDateStart = apiClient.parseDate("2014-12-31") // event_date_start
val eventDateEnd = apiClient.parseDate("2014-12-31") // event_date_end
val eventEndTime = "sampleEventEndTime" // event_end_time
val eventStartTime = "sampleEventStartTime" // event_start_time
val skId = "sampleSkId" // sk_id
val eventType = "sampleEventType" // event_type
val seriesName = "sampleSeriesName" // series_name
val popularity = "samplePopularity" // popularity
val ageRestriction = "sampleAgeRestriction" // age_restriction
val disabled = false // disabled
val venue = "sampleVenue" // venue
try {
val webApi = new WebApi
val response = webApi.eventCreateEvent(displayName, uri, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug, metaTitle, metaDescription, slug, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, seriesName, popularity, ageRestriction, disabled, venue)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventDeleteEvent
Delete an event
POST http://devcms.djs.com/api/events/:pk/delete-event/
Delete an event.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| display_name | String | HTTP Form | display_name | |
| event_date_start | String (date) | HTTP Form | event_date_start | |
| event_date_end | String (date) | HTTP Form | event_date_end | |
| event_end_time | String | HTTP Form | event_end_time | |
| event_start_time | String | HTTP Form | event_start_time | |
| sk_id | String | HTTP Form | sk_id | |
| event_type | String | HTTP Form | event_type | |
| age_restriction | String | HTTP Form | age_restriction | |
| series_name | String | HTTP Form | series_name | |
| popularity | String | HTTP Form | popularity | |
| uri | String | HTTP Form | uri | |
| disabled | Boolean | HTTP Form | disabled | |
| venue | String | HTTP Form | venue |
Request preview:
POST /api/events/PK/delete-event/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
age_restriction=AGE_RESTRICTION&disabled=DISABLED&display_name=DISPLAY_NAME&event_date_end=EVENT_DATE_END&event_date_start=EVENT_DATE_START&event_end_time=EVENT_END_TIME&event_start_time=EVENT_START_TIME&event_type=EVENT_TYPE&meta_description=META_DESCRIPTION&meta_title=META_TITLE&popularity=POPULARITY&series_name=SERIES_NAME&sk_id=SK_ID&slug=SLUG&uri=URI&venue=VENUEThis endpoint returns SuccessSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var displayName: String = "sampleDisplayName"; // display_name
var eventDateStart: String = "sampleEventDateStart"; // event_date_start
var eventDateEnd: String = "sampleEventDateEnd"; // event_date_end
var eventEndTime: String = "sampleEventEndTime"; // event_end_time
var eventStartTime: String = "sampleEventStartTime"; // event_start_time
var skId: String = "sampleSkId"; // sk_id
var eventType: String = "sampleEventType"; // event_type
var ageRestriction: String = "sampleAgeRestriction"; // age_restriction
var seriesName: String = "sampleSeriesName"; // series_name
var popularity: String = "samplePopularity"; // popularity
var uri: String = "sampleUri"; // uri
var disabled: Boolean = True; // disabled
var venue: String = "sampleVenue"; // venue
try
{
var webApi: WebApi = new WebApi();
var response: SuccessSerializer = webApi.event_delete_event(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // display_name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // uri
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.eventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/events/<pk>/delete-event/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "display_name=<display_name>" \
-d "event_date_start=<event_date_start>" \
-d "event_date_end=<event_date_end>" \
-d "event_end_time=<event_end_time>" \
-d "event_start_time=<event_start_time>" \
-d "sk_id=<sk_id>" \
-d "event_type=<event_type>" \
-d "age_restriction=<age_restriction>" \
-d "series_name=<series_name>" \
-d "popularity=<popularity>" \
-d "uri=<uri>" \
-d "disabled=<disabled>" \
-d "venue=<venue>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // display_name
DateTime? eventDateStart = DateTime.Parse("2014-12-31"); // event_date_start
DateTime? eventDateEnd = DateTime.Parse("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // uri
bool? disabled = false; // disabled
String venue = "sampleVenue"; // venue
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.EventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // display_name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // uri
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.eventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['display_name'] = "sampleDisplayName"; // display_name
args['event_date_start'] = "2014-12-31"; // event_date_start
args['event_date_end'] = "2014-12-31"; // event_date_end
args['event_end_time'] = "sampleEventEndTime"; // event_end_time
args['event_start_time'] = "sampleEventStartTime"; // event_start_time
args['sk_id'] = "sampleSkId"; // sk_id
args['event_type'] = "sampleEventType"; // event_type
args['age_restriction'] = "sampleAgeRestriction"; // age_restriction
args['series_name'] = "sampleSeriesName"; // series_name
args['popularity'] = "samplePopularity"; // popularity
args['uri'] = "sampleUri"; // uri
args['disabled'] = false; // disabled
args['venue'] = "sampleVenue"; // venue
swagger.Web.eventDeleteEvent(args, function(response) {
/* success callback */
console.log("Result of Web.eventDeleteEvent");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventDeleteEvent:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *displayName = @"sampleDisplayName"; // display_name
NSDate *eventDateStart = @"sampleEventDateStart"; // event_date_start
NSDate *eventDateEnd = @"sampleEventDateEnd"; // event_date_end
NSString *eventEndTime = @"sampleEventEndTime"; // event_end_time
NSString *eventStartTime = @"sampleEventStartTime"; // event_start_time
NSString *skId = @"sampleSkId"; // sk_id
NSString *eventType = @"sampleEventType"; // event_type
NSString *ageRestriction = @"sampleAgeRestriction"; // age_restriction
NSString *seriesName = @"sampleSeriesName"; // series_name
NSString *popularity = @"samplePopularity"; // popularity
NSString *uri = @"sampleUri"; // uri
NSNumber *disabled = @NO; // disabled
NSString *venue = @"sampleVenue"; // venue
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventDeleteEventWithCompletionBlock:pk
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
displayName:displayName
eventDateStart:eventDateStart
eventDateEnd:eventDateEnd
eventEndTime:eventEndTime
eventStartTime:eventStartTime
skId:skId
eventType:eventType
ageRestriction:ageRestriction
seriesName:seriesName
popularity:popularity
uri:uri
disabled:disabled
venue:venue
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$displayName = "sampleDisplayName"; // display_name
$eventDateStart = "sampleEventDateStart"; // event_date_start
$eventDateEnd = "sampleEventDateEnd"; // event_date_end
$eventEndTime = "sampleEventEndTime"; // event_end_time
$eventStartTime = "sampleEventStartTime"; // event_start_time
$skId = "sampleSkId"; // sk_id
$eventType = "sampleEventType"; // event_type
$ageRestriction = "sampleAgeRestriction"; // age_restriction
$seriesName = "sampleSeriesName"; // series_name
$popularity = "samplePopularity"; // popularity
$uri = "sampleUri"; // uri
$disabled = False; // disabled
$venue = "sampleVenue"; // venue
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessSerializer (model)
$response = $web_api->eventDeleteEvent($pk, $metaTitle, $metaDescription, $slug, $displayName, $eventDateStart, $eventDateEnd, $eventEndTime, $eventStartTime, $skId, $eventType, $ageRestriction, $seriesName, $popularity, $uri, $disabled, $venue);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessSerializer (model)
response = web_api.event_delete_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue")
pprint(response)
# asynchronous call
# thread = web_api.event_delete_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return SuccessSerializer (model)
response = web_api.event_delete_event(pk, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :display_name => "sample_display_name", :event_date_start => "2014-12-31", :event_date_end => "2014-12-31", :event_end_time => "sample_event_end_time", :event_start_time => "sample_event_start_time", :sk_id => "sample_sk_id", :event_type => "sample_event_type", :age_restriction => "sample_age_restriction", :series_name => "sample_series_name", :popularity => "sample_popularity", :uri => "sample_uri", :disabled => false, :venue => "sample_venue")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val displayName = "sampleDisplayName" // display_name
val eventDateStart = apiClient.parseDate("2014-12-31") // event_date_start
val eventDateEnd = apiClient.parseDate("2014-12-31") // event_date_end
val eventEndTime = "sampleEventEndTime" // event_end_time
val eventStartTime = "sampleEventStartTime" // event_start_time
val skId = "sampleSkId" // sk_id
val eventType = "sampleEventType" // event_type
val ageRestriction = "sampleAgeRestriction" // age_restriction
val seriesName = "sampleSeriesName" // series_name
val popularity = "samplePopularity" // popularity
val uri = "sampleUri" // uri
val disabled = false // disabled
val venue = "sampleVenue" // venue
try {
val webApi = new WebApi
val response = webApi.eventDeleteEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventList
List all Events
GET http://devcms.djs.com/api/events/
List all Events
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| artists__artist__slug | String | URL query string | Filter by artist slug |
Request preview:
GET /api/events/?page=PAGE&only_fields=ONLY_FIELDS&per_page=PER_PAGE&ordering=ORDERING&artists__artist__slug=ARTISTS__ARTIST__SLUG HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns EventPaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var artistsArtistSlug: String = "sampleArtistsArtistSlug"; // Filter by artist slug
try
{
var webApi: WebApi = new WebApi();
var response: EventPaginationSerializer = webApi.event_list(page, onlyFields, perPage, ordering, artistsArtistSlug);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventList(page, onlyFields, perPage, ordering, artistsArtistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/events/?page=<page>&only_fields=<only_fields>&per_page=<per_page>&ordering=<ordering>&artists__artist__slug=<artists__artist__slug>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventPaginationSerializer response = webApi.EventList(page, onlyFields, perPage, ordering, artistsArtistSlug);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try {
WebApi webApi = new WebApi();
EventPaginationSerializer response = webApi.eventList(page, onlyFields, perPage, ordering, artistsArtistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artists__artist__slug'] = "sampleArtistsArtistSlug"; // Filter by artist slug
swagger.Web.eventList(args, function(response) {
/* success callback */
console.log("Result of Web.eventList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistsArtistSlug = @"sampleArtistsArtistSlug"; // Filter by artist slug
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
artistsArtistSlug:artistsArtistSlug
completionHandler:^(SWGEventPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistsArtistSlug = "sampleArtistsArtistSlug"; // Filter by artist slug
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return EventPaginationSerializer (model)
$response = $web_api->eventList($page, $onlyFields, $perPage, $ordering, $artistsArtistSlug);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return EventPaginationSerializer (model)
response = web_api.event_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", artists__artist__slug="sample_artists__artist__slug")
pprint(response)
# asynchronous call
# thread = web_api.event_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", artists__artist__slug="sample_artists__artist__slug", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return EventPaginationSerializer (model)
response = web_api.event_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :artists__artist__slug => "sample_artists__artist__slug")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistsArtistSlug = "sampleArtistsArtistSlug" // Filter by artist slug
try {
val webApi = new WebApi
val response = webApi.eventList(page, onlyFields, perPage, ordering, artistsArtistSlug)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventRetrieve
Fetch a single Venue by Slug or ID
GET http://devcms.djs.com/api/events/:pk/
Fetch a single Venue by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/events/PK/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns EventSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: EventSerializer = webApi.event_retrieve(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/events/<pk>/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventSerializer response = webApi.EventRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.eventRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.eventRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventRetrieveWithCompletionBlock:pk
completionHandler:^(SWGEventSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return EventSerializer (model)
$response = $web_api->eventRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return EventSerializer (model)
response = web_api.event_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.event_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return EventSerializer (model)
response = web_api.event_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.eventRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
eventUpdateEvent
Update an event
POST http://devcms.djs.com/api/events/:pk/update-event/
Update an event.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| display_name | String | HTTP Form | Event Display Name | |
| event_date_start | String (date) | HTTP Form | event_date_start | |
| event_date_end | String (date) | HTTP Form | event_date_end | |
| event_end_time | String | HTTP Form | event_end_time | |
| event_start_time | String | HTTP Form | event_start_time | |
| sk_id | String | HTTP Form | sk_id | |
| event_type | String | HTTP Form | event_type | |
| age_restriction | String | HTTP Form | age_restriction | |
| series_name | String | HTTP Form | series_name | |
| popularity | String | HTTP Form | popularity | |
| uri | String | HTTP Form | URI of the ticket link | |
| disabled | Boolean | HTTP Form | disabled | |
| venue | String | HTTP Form | venue | |
| image_thumbnail_download_url | String | HTTP Form | A publicly accessible URL so the file can be downloaded and dumped to S3 in the appropriate location | |
| image_jumbotron_download_url | String | HTTP Form | A publicly accessible Jumbotron URL so the file can be downloaded and dumped to S3 in the appropriate location | |
| venue_slug | String | HTTP Form | Slug of the venue | |
| event_date | String | HTTP Form | US Date formatted Date | |
| event_time | String | HTTP Form | Military time of event start | |
| artist_slug | String | HTTP Form | Artist creating this item |
Request preview:
POST /api/events/PK/update-event/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
age_restriction=AGE_RESTRICTION&artist_slug=ARTIST_SLUG&disabled=DISABLED&display_name=DISPLAY_NAME&event_date=EVENT_DATE&event_date_end=EVENT_DATE_END&event_date_start=EVENT_DATE_START&event_end_time=EVENT_END_TIME&event_start_time=EVENT_START_TIME&event_time=EVENT_TIME&event_type=EVENT_TYPE&image_jumbotron_download_url=IMAGE_JUMBOTRON_DOWNLOAD_URL&image_thumbnail_download_url=IMAGE_THUMBNAIL_DOWNLOAD_URL&meta_description=META_DESCRIPTION&meta_title=META_TITLE&popularity=POPULARITY&series_name=SERIES_NAME&sk_id=SK_ID&slug=SLUG&uri=URI&venue=VENUE&venue_slug=VENUE_SLUGThis endpoint returns EventSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var displayName: String = "sampleDisplayName"; // Event Display Name
var eventDateStart: String = "sampleEventDateStart"; // event_date_start
var eventDateEnd: String = "sampleEventDateEnd"; // event_date_end
var eventEndTime: String = "sampleEventEndTime"; // event_end_time
var eventStartTime: String = "sampleEventStartTime"; // event_start_time
var skId: String = "sampleSkId"; // sk_id
var eventType: String = "sampleEventType"; // event_type
var ageRestriction: String = "sampleAgeRestriction"; // age_restriction
var seriesName: String = "sampleSeriesName"; // series_name
var popularity: String = "samplePopularity"; // popularity
var uri: String = "sampleUri"; // URI of the ticket link
var disabled: Boolean = True; // disabled
var venue: String = "sampleVenue"; // venue
var imageThumbnailDownloadUrl: String = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
var imageJumbotronDownloadUrl: String = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
var venueSlug: String = "sampleVenueSlug"; // Slug of the venue
var eventDate: String = "sampleEventDate"; // US Date formatted Date
var eventTime: String = "sampleEventTime"; // Military time of event start
var artistSlug: String = "sampleArtistSlug"; // Artist creating this item
try
{
var webApi: WebApi = new WebApi();
var response: EventSerializer = webApi.event_update_event(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // Event Display Name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // URI of the ticket link
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/events/<pk>/update-event/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "display_name=<display_name>" \
-d "event_date_start=<event_date_start>" \
-d "event_date_end=<event_date_end>" \
-d "event_end_time=<event_end_time>" \
-d "event_start_time=<event_start_time>" \
-d "sk_id=<sk_id>" \
-d "event_type=<event_type>" \
-d "age_restriction=<age_restriction>" \
-d "series_name=<series_name>" \
-d "popularity=<popularity>" \
-d "uri=<uri>" \
-d "disabled=<disabled>" \
-d "venue=<venue>" \
-d "image_thumbnail_download_url=<image_thumbnail_download_url>" \
-d "image_jumbotron_download_url=<image_jumbotron_download_url>" \
-d "venue_slug=<venue_slug>" \
-d "event_date=<event_date>" \
-d "event_time=<event_time>" \
-d "artist_slug=<artist_slug>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // Event Display Name
DateTime? eventDateStart = DateTime.Parse("2014-12-31"); // event_date_start
DateTime? eventDateEnd = DateTime.Parse("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // URI of the ticket link
bool? disabled = false; // disabled
String venue = "sampleVenue"; // venue
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
EventSerializer response = webApi.EventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String displayName = "sampleDisplayName"; // Event Display Name
Date eventDateStart = apiClient.parseDate("2014-12-31"); // event_date_start
Date eventDateEnd = apiClient.parseDate("2014-12-31"); // event_date_end
String eventEndTime = "sampleEventEndTime"; // event_end_time
String eventStartTime = "sampleEventStartTime"; // event_start_time
String skId = "sampleSkId"; // sk_id
String eventType = "sampleEventType"; // event_type
String ageRestriction = "sampleAgeRestriction"; // age_restriction
String seriesName = "sampleSeriesName"; // series_name
String popularity = "samplePopularity"; // popularity
String uri = "sampleUri"; // URI of the ticket link
Boolean disabled = false; // disabled
String venue = "sampleVenue"; // venue
String imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
String venueSlug = "sampleVenueSlug"; // Slug of the venue
String eventDate = "sampleEventDate"; // US Date formatted Date
String eventTime = "sampleEventTime"; // Military time of event start
String artistSlug = "sampleArtistSlug"; // Artist creating this item
try {
WebApi webApi = new WebApi();
EventSerializer response = webApi.eventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['display_name'] = "sampleDisplayName"; // Event Display Name
args['event_date_start'] = "2014-12-31"; // event_date_start
args['event_date_end'] = "2014-12-31"; // event_date_end
args['event_end_time'] = "sampleEventEndTime"; // event_end_time
args['event_start_time'] = "sampleEventStartTime"; // event_start_time
args['sk_id'] = "sampleSkId"; // sk_id
args['event_type'] = "sampleEventType"; // event_type
args['age_restriction'] = "sampleAgeRestriction"; // age_restriction
args['series_name'] = "sampleSeriesName"; // series_name
args['popularity'] = "samplePopularity"; // popularity
args['uri'] = "sampleUri"; // URI of the ticket link
args['disabled'] = false; // disabled
args['venue'] = "sampleVenue"; // venue
args['image_thumbnail_download_url'] = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['image_jumbotron_download_url'] = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
args['venue_slug'] = "sampleVenueSlug"; // Slug of the venue
args['event_date'] = "sampleEventDate"; // US Date formatted Date
args['event_time'] = "sampleEventTime"; // Military time of event start
args['artist_slug'] = "sampleArtistSlug"; // Artist creating this item
swagger.Web.eventUpdateEvent(args, function(response) {
/* success callback */
console.log("Result of Web.eventUpdateEvent");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.eventUpdateEvent:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *displayName = @"sampleDisplayName"; // Event Display Name
NSDate *eventDateStart = @"sampleEventDateStart"; // event_date_start
NSDate *eventDateEnd = @"sampleEventDateEnd"; // event_date_end
NSString *eventEndTime = @"sampleEventEndTime"; // event_end_time
NSString *eventStartTime = @"sampleEventStartTime"; // event_start_time
NSString *skId = @"sampleSkId"; // sk_id
NSString *eventType = @"sampleEventType"; // event_type
NSString *ageRestriction = @"sampleAgeRestriction"; // age_restriction
NSString *seriesName = @"sampleSeriesName"; // series_name
NSString *popularity = @"samplePopularity"; // popularity
NSString *uri = @"sampleUri"; // URI of the ticket link
NSNumber *disabled = @NO; // disabled
NSString *venue = @"sampleVenue"; // venue
NSString *imageThumbnailDownloadUrl = @"sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *imageJumbotronDownloadUrl = @"sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
NSString *venueSlug = @"sampleVenueSlug"; // Slug of the venue
NSString *eventDate = @"sampleEventDate"; // US Date formatted Date
NSString *eventTime = @"sampleEventTime"; // Military time of event start
NSString *artistSlug = @"sampleArtistSlug"; // Artist creating this item
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi eventUpdateEventWithCompletionBlock:pk
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
displayName:displayName
eventDateStart:eventDateStart
eventDateEnd:eventDateEnd
eventEndTime:eventEndTime
eventStartTime:eventStartTime
skId:skId
eventType:eventType
ageRestriction:ageRestriction
seriesName:seriesName
popularity:popularity
uri:uri
disabled:disabled
venue:venue
imageThumbnailDownloadUrl:imageThumbnailDownloadUrl
imageJumbotronDownloadUrl:imageJumbotronDownloadUrl
venueSlug:venueSlug
eventDate:eventDate
eventTime:eventTime
artistSlug:artistSlug
completionHandler:^(SWGEventSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$displayName = "sampleDisplayName"; // Event Display Name
$eventDateStart = "sampleEventDateStart"; // event_date_start
$eventDateEnd = "sampleEventDateEnd"; // event_date_end
$eventEndTime = "sampleEventEndTime"; // event_end_time
$eventStartTime = "sampleEventStartTime"; // event_start_time
$skId = "sampleSkId"; // sk_id
$eventType = "sampleEventType"; // event_type
$ageRestriction = "sampleAgeRestriction"; // age_restriction
$seriesName = "sampleSeriesName"; // series_name
$popularity = "samplePopularity"; // popularity
$uri = "sampleUri"; // URI of the ticket link
$disabled = False; // disabled
$venue = "sampleVenue"; // venue
$imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl"; // A publicly accessible Jumbotron URL so the file can be...
$venueSlug = "sampleVenueSlug"; // Slug of the venue
$eventDate = "sampleEventDate"; // US Date formatted Date
$eventTime = "sampleEventTime"; // Military time of event start
$artistSlug = "sampleArtistSlug"; // Artist creating this item
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return EventSerializer (model)
$response = $web_api->eventUpdateEvent($pk, $metaTitle, $metaDescription, $slug, $displayName, $eventDateStart, $eventDateEnd, $eventEndTime, $eventStartTime, $skId, $eventType, $ageRestriction, $seriesName, $popularity, $uri, $disabled, $venue, $imageThumbnailDownloadUrl, $imageJumbotronDownloadUrl, $venueSlug, $eventDate, $eventTime, $artistSlug);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return EventSerializer (model)
response = web_api.event_update_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue", image_thumbnail_download_url="sample_image_thumbnail_download_url", image_jumbotron_download_url="sample_image_jumbotron_download_url", venue_slug="sample_venue_slug", event_date="sample_event_date", event_time="sample_event_time", artist_slug="sample_artist_slug")
pprint(response)
# asynchronous call
# thread = web_api.event_update_event(pk, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", display_name="sample_display_name", event_date_start="sample_event_date_start", event_date_end="sample_event_date_end", event_end_time="sample_event_end_time", event_start_time="sample_event_start_time", sk_id="sample_sk_id", event_type="sample_event_type", age_restriction="sample_age_restriction", series_name="sample_series_name", popularity="sample_popularity", uri="sample_uri", disabled=False, venue="sample_venue", image_thumbnail_download_url="sample_image_thumbnail_download_url", image_jumbotron_download_url="sample_image_jumbotron_download_url", venue_slug="sample_venue_slug", event_date="sample_event_date", event_time="sample_event_time", artist_slug="sample_artist_slug", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return EventSerializer (model)
response = web_api.event_update_event(pk, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :display_name => "sample_display_name", :event_date_start => "2014-12-31", :event_date_end => "2014-12-31", :event_end_time => "sample_event_end_time", :event_start_time => "sample_event_start_time", :sk_id => "sample_sk_id", :event_type => "sample_event_type", :age_restriction => "sample_age_restriction", :series_name => "sample_series_name", :popularity => "sample_popularity", :uri => "sample_uri", :disabled => false, :venue => "sample_venue", :image_thumbnail_download_url => "sample_image_thumbnail_download_url", :image_jumbotron_download_url => "sample_image_jumbotron_download_url", :venue_slug => "sample_venue_slug", :event_date => "sample_event_date", :event_time => "sample_event_time", :artist_slug => "sample_artist_slug")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val displayName = "sampleDisplayName" // Event Display Name
val eventDateStart = apiClient.parseDate("2014-12-31") // event_date_start
val eventDateEnd = apiClient.parseDate("2014-12-31") // event_date_end
val eventEndTime = "sampleEventEndTime" // event_end_time
val eventStartTime = "sampleEventStartTime" // event_start_time
val skId = "sampleSkId" // sk_id
val eventType = "sampleEventType" // event_type
val ageRestriction = "sampleAgeRestriction" // age_restriction
val seriesName = "sampleSeriesName" // series_name
val popularity = "samplePopularity" // popularity
val uri = "sampleUri" // URI of the ticket link
val disabled = false // disabled
val venue = "sampleVenue" // venue
val imageThumbnailDownloadUrl = "sampleImageThumbnailDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val imageJumbotronDownloadUrl = "sampleImageJumbotronDownloadUrl" // A publicly accessible Jumbotron URL so the file can be...
val venueSlug = "sampleVenueSlug" // Slug of the venue
val eventDate = "sampleEventDate" // US Date formatted Date
val eventTime = "sampleEventTime" // Military time of event start
val artistSlug = "sampleArtistSlug" // Artist creating this item
try {
val webApi = new WebApi
val response = webApi.eventUpdateEvent(pk, metaTitle, metaDescription, slug, displayName, eventDateStart, eventDateEnd, eventEndTime, eventStartTime, skId, eventType, ageRestriction, seriesName, popularity, uri, disabled, venue, imageThumbnailDownloadUrl, imageJumbotronDownloadUrl, venueSlug, eventDate, eventTime, artistSlug)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
genreArtists
Get an entire unpaginated list of artists within the genre you pass in the path
GET http://devcms.djs.com/api/genres/:pk/artists/
Get an entire unpaginated list of artists within the genre you pass in the path
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/genres/PK/artists/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns GenreSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: GenreSerializer = webApi.genre_artists(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreArtists(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/genres/<pk>/artists/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
GenreSerializer response = webApi.GenreArtists(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreArtists(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.genreArtists(args, function(response) {
/* success callback */
console.log("Result of Web.genreArtists");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.genreArtists:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi genreArtistsWithCompletionBlock:pk
completionHandler:^(SWGGenreSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return GenreSerializer (model)
$response = $web_api->genreArtists($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return GenreSerializer (model)
response = web_api.genre_artists(pk)
pprint(response)
# asynchronous call
# thread = web_api.genre_artists(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return GenreSerializer (model)
response = web_api.genre_artists(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.genreArtists(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
genreList
List all Genres
GET http://devcms.djs.com/api/genres/
List all Genres
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results |
Request preview:
GET /api/genres/?page=PAGE&per_page=PER_PAGE&ordering=ORDERING HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns GenrePaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
try
{
var webApi: WebApi = new WebApi();
var response: GenrePaginationSerializer = webApi.genre_list(page, perPage, ordering);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try {
WebApi webApi = new WebApi();
GenrePaginationSerializer response = webApi.genreList(page, perPage, ordering);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/genres/?page=<page>&per_page=<per_page>&ordering=<ordering>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
GenrePaginationSerializer response = webApi.GenreList(page, perPage, ordering);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try {
WebApi webApi = new WebApi();
GenrePaginationSerializer response = webApi.genreList(page, perPage, ordering);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
swagger.Web.genreList(args, function(response) {
/* success callback */
console.log("Result of Web.genreList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.genreList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi genreListWithCompletionBlock:page
perPage:perPage
ordering:ordering
completionHandler:^(SWGGenrePaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return GenrePaginationSerializer (model)
$response = $web_api->genreList($page, $perPage, $ordering);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return GenrePaginationSerializer (model)
response = web_api.genre_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering")
pprint(response)
# asynchronous call
# thread = web_api.genre_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return GenrePaginationSerializer (model)
response = web_api.genre_list(:page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
try {
val webApi = new WebApi
val response = webApi.genreList(page, perPage, ordering)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
genreRetrieve
Fetch a single Genre by Slug or ID
GET http://devcms.djs.com/api/genres/:pk/
Fetch a single Genre by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/genres/PK/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns GenreSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: GenreSerializer = webApi.genre_retrieve(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/genres/<pk>/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
GenreSerializer response = webApi.GenreRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
GenreSerializer response = webApi.genreRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.genreRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.genreRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.genreRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi genreRetrieveWithCompletionBlock:pk
completionHandler:^(SWGGenreSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return GenreSerializer (model)
$response = $web_api->genreRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return GenreSerializer (model)
response = web_api.genre_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.genre_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return GenreSerializer (model)
response = web_api.genre_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.genreRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
locationList
List all Locations
GET http://devcms.djs.com/api/locations/
List all Locations
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| selectable | Boolean | URL query string | Selectable are the locations that we have designated are top locations for users to select ("True" or "False") | |
| with_events | String | URL query string | Fetch 20 related Dj events. Into the a new "events" index. | |
| event_start_date | String | URL query string | Start date range (end date range required if start is used) MM/DD/YYYY | |
| event_end_date | String | URL query string | End date range (start date range required if start is used) MM/DD/YYYY | |
| event_page | String | URL query string | Paginate through more events by increasing by one. Starting at index of 2 because you get your first page on initial "with_events" request | |
| with_featured_events | String | URL query string | Fetch all featured events into the "featured_events" index. | |
| with_featured_venues | String | URL query string | Fetch all featured venues into the "featured_venues" index. | |
| with_venues | String | URL query string | Fetch 20 related Location Venues. Into the a new "venues" index. | |
| venue_page | String | URL query string | Paginate through more venues by increasing by one. Starting at index of 2 because you get your first page on initial "with_venues" request | |
| event_per_page | String | URL query string | How many per page you would like (Default is 12 events) | |
| venues_per_page | String | URL query string | How many per page you would like (Default is 12 venues) | |
| exclusive_venues | Boolean | URL query string | Boolean flag used to show which venues we have full blown pages for ("True" or "False") |
Request preview:
GET /api/locations/?page=PAGE&only_fields=ONLY_FIELDS&per_page=PER_PAGE&ordering=ORDERING&selectable=SELECTABLE&with_events=WITH_EVENTS&event_start_date=EVENT_START_DATE&event_end_date=EVENT_END_DATE&event_page=EVENT_PAGE&with_featured_events=WITH_FEATURED_EVENTS&with_featured_venues=WITH_FEATURED_VENUES&with_venues=WITH_VENUES&venue_page=VENUE_PAGE&event_per_page=EVENT_PER_PAGE&venues_per_page=VENUES_PER_PAGE&exclusive_venues=EXCLUSIVE_VENUES HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns LocationPaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var selectable: Boolean = True; // Selectable are the locations that we have designated are...
var withEvents: String = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
var eventStartDate: String = "sampleEventStartDate"; // Start date range (end date range required if start is...
var eventEndDate: String = "sampleEventEndDate"; // End date range (start date range required if start is...
var eventPage: String = "sampleEventPage"; // Paginate through more events by increasing by one. ...
var withFeaturedEvents: String = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
var withFeaturedVenues: String = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
var withVenues: String = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
var venuePage: String = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
var eventPerPage: String = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
var venuesPerPage: String = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
var exclusiveVenues: Boolean = True; // Boolean flag used to show which venues we have full blown...
try
{
var webApi: WebApi = new WebApi();
var response: LocationPaginationSerializer = webApi.location_list(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationPaginationSerializer response = webApi.locationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/locations/?page=<page>&only_fields=<only_fields>&per_page=<per_page>&ordering=<ordering>&selectable=<selectable>&with_events=<with_events>&event_start_date=<event_start_date>&event_end_date=<event_end_date>&event_page=<event_page>&with_featured_events=<with_featured_events>&with_featured_venues=<with_featured_venues>&with_venues=<with_venues>&venue_page=<venue_page>&event_per_page=<event_per_page>&venues_per_page=<venues_per_page>&exclusive_venues=<exclusive_venues>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
bool? selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
bool? exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
LocationPaginationSerializer response = webApi.LocationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationPaginationSerializer response = webApi.locationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['selectable'] = false; // Selectable are the locations that we have designated are...
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_start_date'] = "sampleEventStartDate"; // Start date range (end date range required if start is...
args['event_end_date'] = "sampleEventEndDate"; // End date range (start date range required if start is...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_featured_events'] = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
args['with_featured_venues'] = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
args['with_venues'] = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
args['venue_page'] = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
args['venues_per_page'] = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
args['exclusive_venues'] = false; // Boolean flag used to show which venues we have full blown...
swagger.Web.locationList(args, function(response) {
/* success callback */
console.log("Result of Web.locationList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.locationList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSNumber *selectable = @NO; // Selectable are the locations that we have designated are...
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventStartDate = @"sampleEventStartDate"; // Start date range (end date range required if start is...
NSString *eventEndDate = @"sampleEventEndDate"; // End date range (start date range required if start is...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withFeaturedEvents = @"sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
NSString *withFeaturedVenues = @"sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
NSString *withVenues = @"sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
NSString *venuePage = @"sampleVenuePage"; // Paginate through more venues by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
NSString *venuesPerPage = @"sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
NSNumber *exclusiveVenues = @NO; // Boolean flag used to show which venues we have full blown...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi locationListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
selectable:selectable
withEvents:withEvents
eventStartDate:eventStartDate
eventEndDate:eventEndDate
eventPage:eventPage
withFeaturedEvents:withFeaturedEvents
withFeaturedVenues:withFeaturedVenues
withVenues:withVenues
venuePage:venuePage
eventPerPage:eventPerPage
venuesPerPage:venuesPerPage
exclusiveVenues:exclusiveVenues
completionHandler:^(SWGLocationPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$selectable = False; // Selectable are the locations that we have designated are...
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
$eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
$withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
$withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
$venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
$venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
$exclusiveVenues = False; // Boolean flag used to show which venues we have full blown...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return LocationPaginationSerializer (model)
$response = $web_api->locationList($page, $onlyFields, $perPage, $ordering, $selectable, $withEvents, $eventStartDate, $eventEndDate, $eventPage, $withFeaturedEvents, $withFeaturedVenues, $withVenues, $venuePage, $eventPerPage, $venuesPerPage, $exclusiveVenues);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return LocationPaginationSerializer (model)
response = web_api.location_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False)
pprint(response)
# asynchronous call
# thread = web_api.location_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return LocationPaginationSerializer (model)
response = web_api.location_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :selectable => false, :with_events => "sample_with_events", :event_start_date => "sample_event_start_date", :event_end_date => "sample_event_end_date", :event_page => "sample_event_page", :with_featured_events => "sample_with_featured_events", :with_featured_venues => "sample_with_featured_venues", :with_venues => "sample_with_venues", :venue_page => "sample_venue_page", :event_per_page => "sample_event_per_page", :venues_per_page => "sample_venues_per_page", :exclusive_venues => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val selectable = false // Selectable are the locations that we have designated are...
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventStartDate = "sampleEventStartDate" // Start date range (end date range required if start is...
val eventEndDate = "sampleEventEndDate" // End date range (start date range required if start is...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withFeaturedEvents = "sampleWithFeaturedEvents" // Fetch all featured events into the "featured_events" index.
val withFeaturedVenues = "sampleWithFeaturedVenues" // Fetch all featured venues into the "featured_venues" index.
val withVenues = "sampleWithVenues" // Fetch 20 related Location Venues. Into the a new "venues"...
val venuePage = "sampleVenuePage" // Paginate through more venues by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
val venuesPerPage = "sampleVenuesPerPage" // How many per page you would like (Default is 12 venues)
val exclusiveVenues = false // Boolean flag used to show which venues we have full blown...
try {
val webApi = new WebApi
val response = webApi.locationList(page, onlyFields, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
locationRetrieve
Fetch a single Location by Slug or ID
GET http://devcms.djs.com/api/locations/:pk/
Fetch a single Location by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| selectable | Boolean | URL query string | Selectable are the locations that we have designated are top locations for users to select ("True" or "False") | |
| with_events | String | URL query string | Fetch 20 related Dj events. Into the a new "events" index. | |
| event_start_date | String | URL query string | Start date range (end date range required if start is used) MM/DD/YYYY | |
| event_end_date | String | URL query string | End date range (start date range required if start is used) MM/DD/YYYY | |
| event_page | String | URL query string | Paginate through more events by increasing by one. Starting at index of 2 because you get your first page on initial "with_events" request | |
| with_featured_events | String | URL query string | Fetch all featured events into the "featured_events" index. | |
| with_featured_venues | String | URL query string | Fetch all featured venues into the "featured_venues" index. | |
| with_venues | String | URL query string | Fetch 20 related Location Venues. Into the a new "venues" index. | |
| venue_page | String | URL query string | Paginate through more venues by increasing by one. Starting at index of 2 because you get your first page on initial "with_venues" request | |
| event_per_page | String | URL query string | How many per page you would like (Default is 12 events) | |
| venues_per_page | String | URL query string | How many per page you would like (Default is 12 venues) | |
| exclusive_venues | Boolean | URL query string | Boolean flag used to show which venues we have full blown pages for ("True" or "False") |
Request preview:
GET /api/locations/PK/?only_fields=ONLY_FIELDS&page=PAGE&per_page=PER_PAGE&ordering=ORDERING&selectable=SELECTABLE&with_events=WITH_EVENTS&event_start_date=EVENT_START_DATE&event_end_date=EVENT_END_DATE&event_page=EVENT_PAGE&with_featured_events=WITH_FEATURED_EVENTS&with_featured_venues=WITH_FEATURED_VENUES&with_venues=WITH_VENUES&venue_page=VENUE_PAGE&event_per_page=EVENT_PER_PAGE&venues_per_page=VENUES_PER_PAGE&exclusive_venues=EXCLUSIVE_VENUES HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns LocationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var selectable: Boolean = True; // Selectable are the locations that we have designated are...
var withEvents: String = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
var eventStartDate: String = "sampleEventStartDate"; // Start date range (end date range required if start is...
var eventEndDate: String = "sampleEventEndDate"; // End date range (start date range required if start is...
var eventPage: String = "sampleEventPage"; // Paginate through more events by increasing by one. ...
var withFeaturedEvents: String = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
var withFeaturedVenues: String = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
var withVenues: String = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
var venuePage: String = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
var eventPerPage: String = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
var venuesPerPage: String = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
var exclusiveVenues: Boolean = True; // Boolean flag used to show which venues we have full blown...
try
{
var webApi: WebApi = new WebApi();
var response: LocationSerializer = webApi.location_retrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationSerializer response = webApi.locationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/locations/<pk>/?only_fields=<only_fields>&page=<page>&per_page=<per_page>&ordering=<ordering>&selectable=<selectable>&with_events=<with_events>&event_start_date=<event_start_date>&event_end_date=<event_end_date>&event_page=<event_page>&with_featured_events=<with_featured_events>&with_featured_venues=<with_featured_venues>&with_venues=<with_venues>&venue_page=<venue_page>&event_per_page=<event_per_page>&venues_per_page=<venues_per_page>&exclusive_venues=<exclusive_venues>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
bool? selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
bool? exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
LocationSerializer response = webApi.LocationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
Boolean selectable = false; // Selectable are the locations that we have designated are...
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
String eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
String withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
String withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
String venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
String venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
Boolean exclusiveVenues = false; // Boolean flag used to show which venues we have full blown...
try {
WebApi webApi = new WebApi();
LocationSerializer response = webApi.locationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['selectable'] = false; // Selectable are the locations that we have designated are...
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_start_date'] = "sampleEventStartDate"; // Start date range (end date range required if start is...
args['event_end_date'] = "sampleEventEndDate"; // End date range (start date range required if start is...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['with_featured_events'] = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
args['with_featured_venues'] = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
args['with_venues'] = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
args['venue_page'] = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
args['venues_per_page'] = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
args['exclusive_venues'] = false; // Boolean flag used to show which venues we have full blown...
swagger.Web.locationRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.locationRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.locationRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSNumber *selectable = @NO; // Selectable are the locations that we have designated are...
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventStartDate = @"sampleEventStartDate"; // Start date range (end date range required if start is...
NSString *eventEndDate = @"sampleEventEndDate"; // End date range (start date range required if start is...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *withFeaturedEvents = @"sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
NSString *withFeaturedVenues = @"sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
NSString *withVenues = @"sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
NSString *venuePage = @"sampleVenuePage"; // Paginate through more venues by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
NSString *venuesPerPage = @"sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
NSNumber *exclusiveVenues = @NO; // Boolean flag used to show which venues we have full blown...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi locationRetrieveWithCompletionBlock:pk
onlyFields:onlyFields
page:page
perPage:perPage
ordering:ordering
selectable:selectable
withEvents:withEvents
eventStartDate:eventStartDate
eventEndDate:eventEndDate
eventPage:eventPage
withFeaturedEvents:withFeaturedEvents
withFeaturedVenues:withFeaturedVenues
withVenues:withVenues
venuePage:venuePage
eventPerPage:eventPerPage
venuesPerPage:venuesPerPage
exclusiveVenues:exclusiveVenues
completionHandler:^(SWGLocationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$selectable = False; // Selectable are the locations that we have designated are...
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventStartDate = "sampleEventStartDate"; // Start date range (end date range required if start is...
$eventEndDate = "sampleEventEndDate"; // End date range (start date range required if start is...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$withFeaturedEvents = "sampleWithFeaturedEvents"; // Fetch all featured events into the "featured_events" index.
$withFeaturedVenues = "sampleWithFeaturedVenues"; // Fetch all featured venues into the "featured_venues" index.
$withVenues = "sampleWithVenues"; // Fetch 20 related Location Venues. Into the a new "venues"...
$venuePage = "sampleVenuePage"; // Paginate through more venues by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
$venuesPerPage = "sampleVenuesPerPage"; // How many per page you would like (Default is 12 venues)
$exclusiveVenues = False; // Boolean flag used to show which venues we have full blown...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return LocationSerializer (model)
$response = $web_api->locationRetrieve($pk, $onlyFields, $page, $perPage, $ordering, $selectable, $withEvents, $eventStartDate, $eventEndDate, $eventPage, $withFeaturedEvents, $withFeaturedVenues, $withVenues, $venuePage, $eventPerPage, $venuesPerPage, $exclusiveVenues);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return LocationSerializer (model)
response = web_api.location_retrieve(pk, only_fields="sample_only_fields", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False)
pprint(response)
# asynchronous call
# thread = web_api.location_retrieve(pk, only_fields="sample_only_fields", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", selectable=False, with_events="sample_with_events", event_start_date="sample_event_start_date", event_end_date="sample_event_end_date", event_page="sample_event_page", with_featured_events="sample_with_featured_events", with_featured_venues="sample_with_featured_venues", with_venues="sample_with_venues", venue_page="sample_venue_page", event_per_page="sample_event_per_page", venues_per_page="sample_venues_per_page", exclusive_venues=False, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return LocationSerializer (model)
response = web_api.location_retrieve(pk, :only_fields => "sample_only_fields", :page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :selectable => false, :with_events => "sample_with_events", :event_start_date => "sample_event_start_date", :event_end_date => "sample_event_end_date", :event_page => "sample_event_page", :with_featured_events => "sample_with_featured_events", :with_featured_venues => "sample_with_featured_venues", :with_venues => "sample_with_venues", :venue_page => "sample_venue_page", :event_per_page => "sample_event_per_page", :venues_per_page => "sample_venues_per_page", :exclusive_venues => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val selectable = false // Selectable are the locations that we have designated are...
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventStartDate = "sampleEventStartDate" // Start date range (end date range required if start is...
val eventEndDate = "sampleEventEndDate" // End date range (start date range required if start is...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val withFeaturedEvents = "sampleWithFeaturedEvents" // Fetch all featured events into the "featured_events" index.
val withFeaturedVenues = "sampleWithFeaturedVenues" // Fetch all featured venues into the "featured_venues" index.
val withVenues = "sampleWithVenues" // Fetch 20 related Location Venues. Into the a new "venues"...
val venuePage = "sampleVenuePage" // Paginate through more venues by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
val venuesPerPage = "sampleVenuesPerPage" // How many per page you would like (Default is 12 venues)
val exclusiveVenues = false // Boolean flag used to show which venues we have full blown...
try {
val webApi = new WebApi
val response = webApi.locationRetrieve(pk, onlyFields, page, perPage, ordering, selectable, withEvents, eventStartDate, eventEndDate, eventPage, withFeaturedEvents, withFeaturedVenues, withVenues, venuePage, eventPerPage, venuesPerPage, exclusiveVenues)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
musicGet
Get data for "music page"
GET http://devcms.djs.com/api/music/
Get data for "music page"
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | How many results to be returned in each category |
Request preview:
GET /api/music/?page=PAGE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns MusicSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // How many results to be returned in each category
try
{
var webApi: WebApi = new WebApi();
var response: MusicSerializer = webApi.music_get(page);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // How many results to be returned in each category
try {
WebApi webApi = new WebApi();
MusicSerializer response = webApi.musicGet(page);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/music/?page=<page>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // How many results to be returned in each category
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
MusicSerializer response = webApi.MusicGet(page);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // How many results to be returned in each category
try {
WebApi webApi = new WebApi();
MusicSerializer response = webApi.musicGet(page);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // How many results to be returned in each category
swagger.Web.musicGet(args, function(response) {
/* success callback */
console.log("Result of Web.musicGet");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.musicGet:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // How many results to be returned in each category
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi musicGetWithCompletionBlock:page
completionHandler:^(SWGMusicSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // How many results to be returned in each category
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return MusicSerializer (model)
$response = $web_api->musicGet($page);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return MusicSerializer (model)
response = web_api.music_get(page="sample_page")
pprint(response)
# asynchronous call
# thread = web_api.music_get(page="sample_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return MusicSerializer (model)
response = web_api.music_get(:page => "sample_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // How many results to be returned in each category
try {
val webApi = new WebApi
val response = webApi.musicGet(page)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
newsletterSignupCreate
Create a new Newsletter Signup entry
POST http://devcms.djs.com/api/newsletter/
Create a new Newsletter Signup entry
| Name | Type | Location | Description | |
|---|---|---|---|---|
| String | HTTP Form | Contact Email | ||
| name | String | HTTP Form | Contact Name | |
| list_override | String | HTTP Form | Mailchimp override |
Request preview:
POST /api/newsletter/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
email=EMAIL&list_override=LIST_OVERRIDE&name=NAMEThis endpoint returns NewsletterSignupChangeRecordSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 402 | MAIL_CHIMP_ERROR |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var email: String = "sampleEmail"; // Contact Email
var name: String = "sampleName"; // Contact Name
var listOverride: String = "sampleListOverride"; // Mailchimp override
try
{
var webApi: WebApi = new WebApi();
var response: NewsletterSignupChangeRecordSerializer = webApi.newsletter_signup_create(email, name, listOverride);
}
catch (e:Error)
{
trace(e)
}
String email = "sampleEmail"; // Contact Email
String name = "sampleName"; // Contact Name
String listOverride = "sampleListOverride"; // Mailchimp override
try {
WebApi webApi = new WebApi();
NewsletterSignupChangeRecordSerializer response = webApi.newsletterSignupCreate(email, name, listOverride);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/newsletter/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "email=<email>" \
-d "name=<name>" \
-d "list_override=<list_override>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String email = "sampleEmail"; // Contact Email
String name = "sampleName"; // Contact Name
String listOverride = "sampleListOverride"; // Mailchimp override
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
NewsletterSignupChangeRecordSerializer response = webApi.NewsletterSignupCreate(email, name, listOverride);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String email = "sampleEmail"; // Contact Email
String name = "sampleName"; // Contact Name
String listOverride = "sampleListOverride"; // Mailchimp override
try {
WebApi webApi = new WebApi();
NewsletterSignupChangeRecordSerializer response = webApi.newsletterSignupCreate(email, name, listOverride);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['email'] = "sampleEmail"; // Contact Email
args['name'] = "sampleName"; // Contact Name
args['list_override'] = "sampleListOverride"; // Mailchimp override
swagger.Web.newsletterSignupCreate(args, function(response) {
/* success callback */
console.log("Result of Web.newsletterSignupCreate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.newsletterSignupCreate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *email = @"sampleEmail"; // Contact Email
NSString *name = @"sampleName"; // Contact Name
NSString *listOverride = @"sampleListOverride"; // Mailchimp override
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi newsletterSignupCreateWithCompletionBlock:email
name:name
listOverride:listOverride
completionHandler:^(SWGNewsletterSignupChangeRecordSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$email = "sampleEmail"; // Contact Email
$name = "sampleName"; // Contact Name
$listOverride = "sampleListOverride"; // Mailchimp override
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return NewsletterSignupChangeRecordSerializer (model)
$response = $web_api->newsletterSignupCreate($email, $name, $listOverride);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
email = "sample_email" # Contact Email
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return NewsletterSignupChangeRecordSerializer (model)
response = web_api.newsletter_signup_create(email, name="sample_name", list_override="sample_list_override")
pprint(response)
# asynchronous call
# thread = web_api.newsletter_signup_create(email, name="sample_name", list_override="sample_list_override", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
email = "sample_email" # Contact Email
begin
web_api = DjsApi::WebApi.new
# return NewsletterSignupChangeRecordSerializer (model)
response = web_api.newsletter_signup_create(email, :name => "sample_name", :list_override => "sample_list_override")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val email = "sampleEmail" // Contact Email
val name = "sampleName" // Contact Name
val listOverride = "sampleListOverride" // Mailchimp override
try {
val webApi = new WebApi
val response = webApi.newsletterSignupCreate(email, name, listOverride)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
postList
List all Blog Posts
GET http://devcms.djs.com/api/blog_posts/
List all Blog Posts
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| author__id | String | URL query string | ID of author to filter | |
| category__title | String | URL query string | Category string to filter by | |
| title | String | URL query string | Filter by blog post title | |
| featured_posts | String | URL query string | Filter by featured_posts. Just pass True to get all the featured articles. Or False, 0 or 1 | |
| is_draft | String | URL query string | Filter by is_draft |
Request preview:
GET /api/blog_posts/?page=PAGE&per_page=PER_PAGE&ordering=ORDERING&author__id=AUTHOR__ID&category__title=CATEGORY__TITLE&title=TITLE&featured_posts=FEATURED_POSTS&is_draft=IS_DRAFT HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns PostPaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var authorId: String = "sampleAuthorId"; // ID of author to filter
var categoryTitle: String = "sampleCategoryTitle"; // Category string to filter by
var title: String = "sampleTitle"; // Filter by blog post title
var featuredPosts: String = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
var isDraft: String = "sampleIsDraft"; // Filter by is_draft
try
{
var webApi: WebApi = new WebApi();
var response: PostPaginationSerializer = webApi.post_list(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String authorId = "sampleAuthorId"; // ID of author to filter
String categoryTitle = "sampleCategoryTitle"; // Category string to filter by
String title = "sampleTitle"; // Filter by blog post title
String featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
String isDraft = "sampleIsDraft"; // Filter by is_draft
try {
WebApi webApi = new WebApi();
PostPaginationSerializer response = webApi.postList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/blog_posts/?page=<page>&per_page=<per_page>&ordering=<ordering>&author__id=<author__id>&category__title=<category__title>&title=<title>&featured_posts=<featured_posts>&is_draft=<is_draft>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String authorId = "sampleAuthorId"; // ID of author to filter
String categoryTitle = "sampleCategoryTitle"; // Category string to filter by
String title = "sampleTitle"; // Filter by blog post title
String featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
String isDraft = "sampleIsDraft"; // Filter by is_draft
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
PostPaginationSerializer response = webApi.PostList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String authorId = "sampleAuthorId"; // ID of author to filter
String categoryTitle = "sampleCategoryTitle"; // Category string to filter by
String title = "sampleTitle"; // Filter by blog post title
String featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
String isDraft = "sampleIsDraft"; // Filter by is_draft
try {
WebApi webApi = new WebApi();
PostPaginationSerializer response = webApi.postList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['author__id'] = "sampleAuthorId"; // ID of author to filter
args['category__title'] = "sampleCategoryTitle"; // Category string to filter by
args['title'] = "sampleTitle"; // Filter by blog post title
args['featured_posts'] = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
args['is_draft'] = "sampleIsDraft"; // Filter by is_draft
swagger.Web.postList(args, function(response) {
/* success callback */
console.log("Result of Web.postList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.postList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *authorId = @"sampleAuthorId"; // ID of author to filter
NSString *categoryTitle = @"sampleCategoryTitle"; // Category string to filter by
NSString *title = @"sampleTitle"; // Filter by blog post title
NSString *featuredPosts = @"sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
NSString *isDraft = @"sampleIsDraft"; // Filter by is_draft
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi postListWithCompletionBlock:page
perPage:perPage
ordering:ordering
authorId:authorId
categoryTitle:categoryTitle
title:title
featuredPosts:featuredPosts
isDraft:isDraft
completionHandler:^(SWGPostPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$authorId = "sampleAuthorId"; // ID of author to filter
$categoryTitle = "sampleCategoryTitle"; // Category string to filter by
$title = "sampleTitle"; // Filter by blog post title
$featuredPosts = "sampleFeaturedPosts"; // Filter by featured_posts. Just pass True to get all the...
$isDraft = "sampleIsDraft"; // Filter by is_draft
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return PostPaginationSerializer (model)
$response = $web_api->postList($page, $perPage, $ordering, $authorId, $categoryTitle, $title, $featuredPosts, $isDraft);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return PostPaginationSerializer (model)
response = web_api.post_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", author__id="sample_author__id", category__title="sample_category__title", title="sample_title", featured_posts="sample_featured_posts", is_draft="sample_is_draft")
pprint(response)
# asynchronous call
# thread = web_api.post_list(page="sample_page", per_page="sample_per_page", ordering="sample_ordering", author__id="sample_author__id", category__title="sample_category__title", title="sample_title", featured_posts="sample_featured_posts", is_draft="sample_is_draft", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return PostPaginationSerializer (model)
response = web_api.post_list(:page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :author__id => "sample_author__id", :category__title => "sample_category__title", :title => "sample_title", :featured_posts => "sample_featured_posts", :is_draft => "sample_is_draft")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val authorId = "sampleAuthorId" // ID of author to filter
val categoryTitle = "sampleCategoryTitle" // Category string to filter by
val title = "sampleTitle" // Filter by blog post title
val featuredPosts = "sampleFeaturedPosts" // Filter by featured_posts. Just pass True to get all the...
val isDraft = "sampleIsDraft" // Filter by is_draft
try {
val webApi = new WebApi
val response = webApi.postList(page, perPage, ordering, authorId, categoryTitle, title, featuredPosts, isDraft)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
postRetrieve
GET http://devcms.djs.com/api/blog_posts/:pk/
Please provide a description for the endpoint
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/blog_posts/PK/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns PostSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: PostSerializer = webApi.post_retrieve(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
PostSerializer response = webApi.postRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/blog_posts/<pk>/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
PostSerializer response = webApi.PostRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
PostSerializer response = webApi.postRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.postRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.postRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.postRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi postRetrieveWithCompletionBlock:pk
completionHandler:^(SWGPostSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return PostSerializer (model)
$response = $web_api->postRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return PostSerializer (model)
response = web_api.post_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.post_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return PostSerializer (model)
response = web_api.post_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.postRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
searchGet
Search djs
GET http://devcms.djs.com/api/search/
Search djs.com website
| Name | Type | Location | Description | |
|---|---|---|---|---|
| q | String | URL query string | Search criteria | |
| per_page | String | URL query string | How many results to be returned in each category | |
| without_events | String | URL query string | Skip showing the "event" index. | |
| without_tracks | String | URL query string | Skip showing the "track" index. | |
| without_artists | String | URL query string | Skip showing the "artist" index. | |
| without_venues | String | URL query string | Skip showing the "venue" index. | |
| without_users | String | URL query string | Skip showing the "users" index. |
Request preview:
GET /api/search/?q=Q&per_page=PER_PAGE&without_events=WITHOUT_EVENTS&without_tracks=WITHOUT_TRACKS&without_artists=WITHOUT_ARTISTS&without_venues=WITHOUT_VENUES&without_users=WITHOUT_USERS HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns SearchSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var q: String = "sampleQ"; // Search criteria
var perPage: String = "samplePerPage"; // How many results to be returned in each category
var withoutEvents: String = "sampleWithoutEvents"; // Skip showing the "event" index.
var withoutTracks: String = "sampleWithoutTracks"; // Skip showing the "track" index.
var withoutArtists: String = "sampleWithoutArtists"; // Skip showing the "artist" index.
var withoutVenues: String = "sampleWithoutVenues"; // Skip showing the "venue" index.
var withoutUsers: String = "sampleWithoutUsers"; // Skip showing the "users" index.
try
{
var webApi: WebApi = new WebApi();
var response: SearchSerializer = webApi.search_get(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
}
catch (e:Error)
{
trace(e)
}
String q = "sampleQ"; // Search criteria
String perPage = "samplePerPage"; // How many results to be returned in each category
String withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
String withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
String withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
String withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
String withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try {
WebApi webApi = new WebApi();
SearchSerializer response = webApi.searchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/search/?q=<q>&per_page=<per_page>&without_events=<without_events>&without_tracks=<without_tracks>&without_artists=<without_artists>&without_venues=<without_venues>&without_users=<without_users>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String q = "sampleQ"; // Search criteria
String perPage = "samplePerPage"; // How many results to be returned in each category
String withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
String withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
String withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
String withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
String withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SearchSerializer response = webApi.SearchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String q = "sampleQ"; // Search criteria
String perPage = "samplePerPage"; // How many results to be returned in each category
String withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
String withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
String withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
String withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
String withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try {
WebApi webApi = new WebApi();
SearchSerializer response = webApi.searchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['q'] = "sampleQ"; // Search criteria
args['per_page'] = "samplePerPage"; // How many results to be returned in each category
args['without_events'] = "sampleWithoutEvents"; // Skip showing the "event" index.
args['without_tracks'] = "sampleWithoutTracks"; // Skip showing the "track" index.
args['without_artists'] = "sampleWithoutArtists"; // Skip showing the "artist" index.
args['without_venues'] = "sampleWithoutVenues"; // Skip showing the "venue" index.
args['without_users'] = "sampleWithoutUsers"; // Skip showing the "users" index.
swagger.Web.searchGet(args, function(response) {
/* success callback */
console.log("Result of Web.searchGet");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.searchGet:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *q = @"sampleQ"; // Search criteria
NSString *perPage = @"samplePerPage"; // How many results to be returned in each category
NSString *withoutEvents = @"sampleWithoutEvents"; // Skip showing the "event" index.
NSString *withoutTracks = @"sampleWithoutTracks"; // Skip showing the "track" index.
NSString *withoutArtists = @"sampleWithoutArtists"; // Skip showing the "artist" index.
NSString *withoutVenues = @"sampleWithoutVenues"; // Skip showing the "venue" index.
NSString *withoutUsers = @"sampleWithoutUsers"; // Skip showing the "users" index.
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi searchGetWithCompletionBlock:q
perPage:perPage
withoutEvents:withoutEvents
withoutTracks:withoutTracks
withoutArtists:withoutArtists
withoutVenues:withoutVenues
withoutUsers:withoutUsers
completionHandler:^(SWGSearchSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$q = "sampleQ"; // Search criteria
$perPage = "samplePerPage"; // How many results to be returned in each category
$withoutEvents = "sampleWithoutEvents"; // Skip showing the "event" index.
$withoutTracks = "sampleWithoutTracks"; // Skip showing the "track" index.
$withoutArtists = "sampleWithoutArtists"; // Skip showing the "artist" index.
$withoutVenues = "sampleWithoutVenues"; // Skip showing the "venue" index.
$withoutUsers = "sampleWithoutUsers"; // Skip showing the "users" index.
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SearchSerializer (model)
$response = $web_api->searchGet($q, $perPage, $withoutEvents, $withoutTracks, $withoutArtists, $withoutVenues, $withoutUsers);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
q = "sample_q" # Search criteria
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SearchSerializer (model)
response = web_api.search_get(q, per_page="sample_per_page", without_events="sample_without_events", without_tracks="sample_without_tracks", without_artists="sample_without_artists", without_venues="sample_without_venues", without_users="sample_without_users")
pprint(response)
# asynchronous call
# thread = web_api.search_get(q, per_page="sample_per_page", without_events="sample_without_events", without_tracks="sample_without_tracks", without_artists="sample_without_artists", without_venues="sample_without_venues", without_users="sample_without_users", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
q = "sample_q" # Search criteria
begin
web_api = DjsApi::WebApi.new
# return SearchSerializer (model)
response = web_api.search_get(q, :per_page => "sample_per_page", :without_events => "sample_without_events", :without_tracks => "sample_without_tracks", :without_artists => "sample_without_artists", :without_venues => "sample_without_venues", :without_users => "sample_without_users")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val q = "sampleQ" // Search criteria
val perPage = "samplePerPage" // How many results to be returned in each category
val withoutEvents = "sampleWithoutEvents" // Skip showing the "event" index.
val withoutTracks = "sampleWithoutTracks" // Skip showing the "track" index.
val withoutArtists = "sampleWithoutArtists" // Skip showing the "artist" index.
val withoutVenues = "sampleWithoutVenues" // Skip showing the "venue" index.
val withoutUsers = "sampleWithoutUsers" // Skip showing the "users" index.
try {
val webApi = new WebApi
val response = webApi.searchGet(q, perPage, withoutEvents, withoutTracks, withoutArtists, withoutVenues, withoutUsers)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackCreateTrack
Creates a new track
POST http://devcms.djs.com/api/tracks/create-track/
Creates a new track.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| title | String | HTTP Form | Track Title | |
| internal_id | String | HTTP Form | internal_id | |
| description | String | HTTP Form | Track Description | |
| image_download_url | String | HTTP Form | A publicly accessible URL so the file can be downloaded and dumped to S3 in the appropriate location | |
| duration | String | HTTP Form | Number of milliseconds of the track | |
| original_content_size | String | HTTP Form | Original Content size | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| tag_list | String | HTTP Form | tag_list | |
| waveform_url | String | HTTP Form | waveform_url | |
| slug | String | HTTP Form | slug | |
| artwork_url | String | HTTP Form | artwork_url | |
| playback_count | Integer (signed 64 bits) | HTTP Form | playback_count Minimum: -2147483648 Maximum: 2147483647 | |
| state | String | HTTP Form | state | |
| favoritings_count | Integer (signed 64 bits) | HTTP Form | favoritings_count Minimum: -2147483648 Maximum: 2147483647 | |
| genre | String | HTTP Form | genre | |
| kind | String | HTTP Form | kind | |
| uploaded_on | String (date) | HTTP Form | uploaded_on | |
| is_liked | Boolean | HTTP Form | is_liked | |
| is_reposted | Boolean | HTTP Form | is_reposted |
Request preview:
POST /api/tracks/create-track/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
artwork_url=ARTWORK_URL&description=DESCRIPTION&duration=DURATION&favoritings_count=-2147483648&genre=GENRE&image_download_url=IMAGE_DOWNLOAD_URL&internal_id=INTERNAL_ID&is_liked=IS_LIKED&is_reposted=IS_REPOSTED&kind=KIND&meta_description=META_DESCRIPTION&meta_title=META_TITLE&original_content_size=ORIGINAL_CONTENT_SIZE&playback_count=-2147483648&slug=SLUG&state=STATE&tag_list=TAG_LIST&title=TITLE&uploaded_on=UPLOADED_ON&waveform_url=WAVEFORM_URLThis endpoint returns TrackSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var title: String = "sampleTitle"; // Track Title
var internalId: String = "sampleInternalId"; // internal_id
var description: String = "sampleDescription"; // Track Description
var imageDownloadUrl: String = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
var duration: String = "sampleDuration"; // Number of milliseconds of the track
var originalContentSize: String = "sampleOriginalContentSize"; // Original Content size
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var tagList: String = "sampleTagList"; // tag_list
var waveformUrl: String = "sampleWaveformUrl"; // waveform_url
var slug: String = "sampleSlug"; // slug
var artworkUrl: String = "sampleArtworkUrl"; // artwork_url
var playbackCount: Number = -2147483648; // playback_count
var state: String = "sampleState"; // state
var favoritingsCount: Number = -2147483648; // favoritings_count
var genre: String = "sampleGenre"; // genre
var kind: String = "sampleKind"; // kind
var uploadedOn: String = "sampleUploadedOn"; // uploaded_on
var isLiked: Boolean = True; // is_liked
var isReposted: Boolean = True; // is_reposted
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_create_track(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
}
catch (e:Error)
{
trace(e)
}
String title = "sampleTitle"; // Track Title
String internalId = "sampleInternalId"; // internal_id
String description = "sampleDescription"; // Track Description
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String tagList = "sampleTagList"; // tag_list
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String slug = "sampleSlug"; // slug
String artworkUrl = "sampleArtworkUrl"; // artwork_url
Long playbackCount = new Long(-2147483648); // playback_count
String state = "sampleState"; // state
Long favoritingsCount = new Long(-2147483648); // favoritings_count
String genre = "sampleGenre"; // genre
String kind = "sampleKind"; // kind
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/tracks/create-track/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "title=<title>" \
-d "internal_id=<internal_id>" \
-d "description=<description>" \
-d "image_download_url=<image_download_url>" \
-d "duration=<duration>" \
-d "original_content_size=<original_content_size>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "tag_list=<tag_list>" \
-d "waveform_url=<waveform_url>" \
-d "slug=<slug>" \
-d "artwork_url=<artwork_url>" \
-d "playback_count=-2147483648" \
-d "state=<state>" \
-d "favoritings_count=-2147483648" \
-d "genre=<genre>" \
-d "kind=<kind>" \
-d "uploaded_on=<uploaded_on>" \
-d "is_liked=<is_liked>" \
-d "is_reposted=<is_reposted>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String title = "sampleTitle"; // Track Title
String internalId = "sampleInternalId"; // internal_id
String description = "sampleDescription"; // Track Description
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String tagList = "sampleTagList"; // tag_list
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String slug = "sampleSlug"; // slug
String artworkUrl = "sampleArtworkUrl"; // artwork_url
long? playbackCount = -2147483648; // playback_count
String state = "sampleState"; // state
long? favoritingsCount = -2147483648; // favoritings_count
String genre = "sampleGenre"; // genre
String kind = "sampleKind"; // kind
DateTime? uploadedOn = DateTime.Parse("2014-12-31"); // uploaded_on
bool? isLiked = false; // is_liked
bool? isReposted = false; // is_reposted
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String title = "sampleTitle"; // Track Title
String internalId = "sampleInternalId"; // internal_id
String description = "sampleDescription"; // Track Description
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String tagList = "sampleTagList"; // tag_list
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String slug = "sampleSlug"; // slug
String artworkUrl = "sampleArtworkUrl"; // artwork_url
Long playbackCount = new Long(-2147483648); // playback_count
String state = "sampleState"; // state
Long favoritingsCount = new Long(-2147483648); // favoritings_count
String genre = "sampleGenre"; // genre
String kind = "sampleKind"; // kind
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['title'] = "sampleTitle"; // Track Title
args['internal_id'] = "sampleInternalId"; // internal_id
args['description'] = "sampleDescription"; // Track Description
args['image_download_url'] = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['duration'] = "sampleDuration"; // Number of milliseconds of the track
args['original_content_size'] = "sampleOriginalContentSize"; // Original Content size
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['tag_list'] = "sampleTagList"; // tag_list
args['waveform_url'] = "sampleWaveformUrl"; // waveform_url
args['slug'] = "sampleSlug"; // slug
args['artwork_url'] = "sampleArtworkUrl"; // artwork_url
args['playback_count'] = -2147483648; // playback_count
args['state'] = "sampleState"; // state
args['favoritings_count'] = -2147483648; // favoritings_count
args['genre'] = "sampleGenre"; // genre
args['kind'] = "sampleKind"; // kind
args['uploaded_on'] = "2014-12-31"; // uploaded_on
args['is_liked'] = false; // is_liked
args['is_reposted'] = false; // is_reposted
swagger.Web.trackCreateTrack(args, function(response) {
/* success callback */
console.log("Result of Web.trackCreateTrack");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackCreateTrack:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *title = @"sampleTitle"; // Track Title
NSString *internalId = @"sampleInternalId"; // internal_id
NSString *description = @"sampleDescription"; // Track Description
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *duration = @"sampleDuration"; // Number of milliseconds of the track
NSString *originalContentSize = @"sampleOriginalContentSize"; // Original Content size
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *tagList = @"sampleTagList"; // tag_list
NSString *waveformUrl = @"sampleWaveformUrl"; // waveform_url
NSString *slug = @"sampleSlug"; // slug
NSString *artworkUrl = @"sampleArtworkUrl"; // artwork_url
NSNumber *playbackCount = @-2147483648; // playback_count
NSString *state = @"sampleState"; // state
NSNumber *favoritingsCount = @-2147483648; // favoritings_count
NSString *genre = @"sampleGenre"; // genre
NSString *kind = @"sampleKind"; // kind
NSDate *uploadedOn = @"sampleUploadedOn"; // uploaded_on
NSNumber *isLiked = @NO; // is_liked
NSNumber *isReposted = @NO; // is_reposted
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackCreateTrackWithCompletionBlock:title
internalId:internalId
description:description
imageDownloadUrl:imageDownloadUrl
duration:duration
originalContentSize:originalContentSize
metaTitle:metaTitle
metaDescription:metaDescription
tagList:tagList
waveformUrl:waveformUrl
slug:slug
artworkUrl:artworkUrl
playbackCount:playbackCount
state:state
favoritingsCount:favoritingsCount
genre:genre
kind:kind
uploadedOn:uploadedOn
isLiked:isLiked
isReposted:isReposted
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$title = "sampleTitle"; // Track Title
$internalId = "sampleInternalId"; // internal_id
$description = "sampleDescription"; // Track Description
$imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$duration = "sampleDuration"; // Number of milliseconds of the track
$originalContentSize = "sampleOriginalContentSize"; // Original Content size
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$tagList = "sampleTagList"; // tag_list
$waveformUrl = "sampleWaveformUrl"; // waveform_url
$slug = "sampleSlug"; // slug
$artworkUrl = "sampleArtworkUrl"; // artwork_url
$playbackCount = -2147483648; // playback_count
$state = "sampleState"; // state
$favoritingsCount = -2147483648; // favoritings_count
$genre = "sampleGenre"; // genre
$kind = "sampleKind"; // kind
$uploadedOn = "sampleUploadedOn"; // uploaded_on
$isLiked = False; // is_liked
$isReposted = False; // is_reposted
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackCreateTrack($title, $internalId, $description, $imageDownloadUrl, $duration, $originalContentSize, $metaTitle, $metaDescription, $tagList, $waveformUrl, $slug, $artworkUrl, $playbackCount, $state, $favoritingsCount, $genre, $kind, $uploadedOn, $isLiked, $isReposted);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
title = "sample_title" # Track Title
internal_id = "sample_internal_id" # internal_id
description = "sample_description" # Track Description
image_download_url = "sample_image_download_url" # A publicly accessible URL so the file can be downloaded...
duration = "sample_duration" # Number of milliseconds of the track
original_content_size = "sample_original_content_size" # Original Content size
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_create_track(title, internal_id, description, image_download_url, duration, original_content_size, meta_title="sample_meta_title", meta_description="sample_meta_description", tag_list="sample_tag_list", waveform_url="sample_waveform_url", slug="sample_slug", artwork_url="sample_artwork_url", playback_count=-2147483648, state="sample_state", favoritings_count=-2147483648, genre="sample_genre", kind="sample_kind", uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False)
pprint(response)
# asynchronous call
# thread = web_api.track_create_track(title, internal_id, description, image_download_url, duration, original_content_size, meta_title="sample_meta_title", meta_description="sample_meta_description", tag_list="sample_tag_list", waveform_url="sample_waveform_url", slug="sample_slug", artwork_url="sample_artwork_url", playback_count=-2147483648, state="sample_state", favoritings_count=-2147483648, genre="sample_genre", kind="sample_kind", uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
title = "sample_title" # Track Title
internal_id = "sample_internal_id" # internal_id
description = "sample_description" # Track Description
image_download_url = "sample_image_download_url" # A publicly accessible URL so the file can be downloaded...
duration = "sample_duration" # Number of milliseconds of the track
original_content_size = "sample_original_content_size" # Original Content size
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_create_track(title, internal_id, description, image_download_url, duration, original_content_size, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :tag_list => "sample_tag_list", :waveform_url => "sample_waveform_url", :slug => "sample_slug", :artwork_url => "sample_artwork_url", :playback_count => -2147483648, :state => "sample_state", :favoritings_count => -2147483648, :genre => "sample_genre", :kind => "sample_kind", :uploaded_on => "2014-12-31", :is_liked => false, :is_reposted => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val title = "sampleTitle" // Track Title
val internalId = "sampleInternalId" // internal_id
val description = "sampleDescription" // Track Description
val imageDownloadUrl = "sampleImageDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val duration = "sampleDuration" // Number of milliseconds of the track
val originalContentSize = "sampleOriginalContentSize" // Original Content size
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val tagList = "sampleTagList" // tag_list
val waveformUrl = "sampleWaveformUrl" // waveform_url
val slug = "sampleSlug" // slug
val artworkUrl = "sampleArtworkUrl" // artwork_url
val playbackCount = -2147483648L // playback_count
val state = "sampleState" // state
val favoritingsCount = -2147483648L // favoritings_count
val genre = "sampleGenre" // genre
val kind = "sampleKind" // kind
val uploadedOn = apiClient.parseDate("2014-12-31") // uploaded_on
val isLiked = false // is_liked
val isReposted = false // is_reposted
try {
val webApi = new WebApi
val response = webApi.trackCreateTrack(title, internalId, description, imageDownloadUrl, duration, originalContentSize, metaTitle, metaDescription, tagList, waveformUrl, slug, artworkUrl, playbackCount, state, favoritingsCount, genre, kind, uploadedOn, isLiked, isReposted)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackDeleteTrack
Delete a track
POST http://devcms.djs.com/api/tracks/:pk/delete-track/
Delete a track.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| internal_id | String | HTTP Form | internal_id | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | slug | |
| title | String | HTTP Form | title | |
| artwork_url | String | HTTP Form | artwork_url | |
| waveform_url | String | HTTP Form | waveform_url | |
| tag_list | String | HTTP Form | tag_list | |
| kind | String | HTTP Form | kind | |
| genre | String | HTTP Form | genre | |
| state | String | HTTP Form | state | |
| description | String | HTTP Form | description | |
| favoritings_count | Integer (signed 64 bits) | HTTP Form | favoritings_count Minimum: -2147483648 Maximum: 2147483647 | |
| playback_count | Integer (signed 64 bits) | HTTP Form | playback_count Minimum: -2147483648 Maximum: 2147483647 | |
| uploaded_on | String (date) | HTTP Form | uploaded_on | |
| is_liked | Boolean | HTTP Form | is_liked | |
| is_reposted | Boolean | HTTP Form | is_reposted |
Request preview:
POST /api/tracks/PK/delete-track/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
artwork_url=ARTWORK_URL&description=DESCRIPTION&favoritings_count=-2147483648&genre=GENRE&internal_id=INTERNAL_ID&is_liked=IS_LIKED&is_reposted=IS_REPOSTED&kind=KIND&meta_description=META_DESCRIPTION&meta_title=META_TITLE&playback_count=-2147483648&slug=SLUG&state=STATE&tag_list=TAG_LIST&title=TITLE&uploaded_on=UPLOADED_ON&waveform_url=WAVEFORM_URLThis endpoint returns SuccessSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var internalId: String = "sampleInternalId"; // internal_id
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // slug
var title: String = "sampleTitle"; // title
var artworkUrl: String = "sampleArtworkUrl"; // artwork_url
var waveformUrl: String = "sampleWaveformUrl"; // waveform_url
var tagList: String = "sampleTagList"; // tag_list
var kind: String = "sampleKind"; // kind
var genre: String = "sampleGenre"; // genre
var state: String = "sampleState"; // state
var description: String = "sampleDescription"; // description
var favoritingsCount: Number = -2147483648; // favoritings_count
var playbackCount: Number = -2147483648; // playback_count
var uploadedOn: String = "sampleUploadedOn"; // uploaded_on
var isLiked: Boolean = True; // is_liked
var isReposted: Boolean = True; // is_reposted
try
{
var webApi: WebApi = new WebApi();
var response: SuccessSerializer = webApi.track_delete_track(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String title = "sampleTitle"; // title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.trackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/tracks/<pk>/delete-track/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "internal_id=<internal_id>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "title=<title>" \
-d "artwork_url=<artwork_url>" \
-d "waveform_url=<waveform_url>" \
-d "tag_list=<tag_list>" \
-d "kind=<kind>" \
-d "genre=<genre>" \
-d "state=<state>" \
-d "description=<description>" \
-d "favoritings_count=-2147483648" \
-d "playback_count=-2147483648" \
-d "uploaded_on=<uploaded_on>" \
-d "is_liked=<is_liked>" \
-d "is_reposted=<is_reposted>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String title = "sampleTitle"; // title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // description
long? favoritingsCount = -2147483648; // favoritings_count
long? playbackCount = -2147483648; // playback_count
DateTime? uploadedOn = DateTime.Parse("2014-12-31"); // uploaded_on
bool? isLiked = false; // is_liked
bool? isReposted = false; // is_reposted
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
SuccessSerializer response = webApi.TrackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // slug
String title = "sampleTitle"; // title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
try {
WebApi webApi = new WebApi();
SuccessSerializer response = webApi.trackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['internal_id'] = "sampleInternalId"; // internal_id
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // slug
args['title'] = "sampleTitle"; // title
args['artwork_url'] = "sampleArtworkUrl"; // artwork_url
args['waveform_url'] = "sampleWaveformUrl"; // waveform_url
args['tag_list'] = "sampleTagList"; // tag_list
args['kind'] = "sampleKind"; // kind
args['genre'] = "sampleGenre"; // genre
args['state'] = "sampleState"; // state
args['description'] = "sampleDescription"; // description
args['favoritings_count'] = -2147483648; // favoritings_count
args['playback_count'] = -2147483648; // playback_count
args['uploaded_on'] = "2014-12-31"; // uploaded_on
args['is_liked'] = false; // is_liked
args['is_reposted'] = false; // is_reposted
swagger.Web.trackDeleteTrack(args, function(response) {
/* success callback */
console.log("Result of Web.trackDeleteTrack");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackDeleteTrack:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *internalId = @"sampleInternalId"; // internal_id
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // slug
NSString *title = @"sampleTitle"; // title
NSString *artworkUrl = @"sampleArtworkUrl"; // artwork_url
NSString *waveformUrl = @"sampleWaveformUrl"; // waveform_url
NSString *tagList = @"sampleTagList"; // tag_list
NSString *kind = @"sampleKind"; // kind
NSString *genre = @"sampleGenre"; // genre
NSString *state = @"sampleState"; // state
NSString *description = @"sampleDescription"; // description
NSNumber *favoritingsCount = @-2147483648; // favoritings_count
NSNumber *playbackCount = @-2147483648; // playback_count
NSDate *uploadedOn = @"sampleUploadedOn"; // uploaded_on
NSNumber *isLiked = @NO; // is_liked
NSNumber *isReposted = @NO; // is_reposted
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackDeleteTrackWithCompletionBlock:pk
internalId:internalId
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
title:title
artworkUrl:artworkUrl
waveformUrl:waveformUrl
tagList:tagList
kind:kind
genre:genre
state:state
description:description
favoritingsCount:favoritingsCount
playbackCount:playbackCount
uploadedOn:uploadedOn
isLiked:isLiked
isReposted:isReposted
completionHandler:^(SWGSuccessSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$internalId = "sampleInternalId"; // internal_id
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // slug
$title = "sampleTitle"; // title
$artworkUrl = "sampleArtworkUrl"; // artwork_url
$waveformUrl = "sampleWaveformUrl"; // waveform_url
$tagList = "sampleTagList"; // tag_list
$kind = "sampleKind"; // kind
$genre = "sampleGenre"; // genre
$state = "sampleState"; // state
$description = "sampleDescription"; // description
$favoritingsCount = -2147483648; // favoritings_count
$playbackCount = -2147483648; // playback_count
$uploadedOn = "sampleUploadedOn"; // uploaded_on
$isLiked = False; // is_liked
$isReposted = False; // is_reposted
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return SuccessSerializer (model)
$response = $web_api->trackDeleteTrack($pk, $internalId, $metaTitle, $metaDescription, $slug, $title, $artworkUrl, $waveformUrl, $tagList, $kind, $genre, $state, $description, $favoritingsCount, $playbackCount, $uploadedOn, $isLiked, $isReposted);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return SuccessSerializer (model)
response = web_api.track_delete_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False)
pprint(response)
# asynchronous call
# thread = web_api.track_delete_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
begin
web_api = DjsApi::WebApi.new
# return SuccessSerializer (model)
response = web_api.track_delete_track(pk, internal_id, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :title => "sample_title", :artwork_url => "sample_artwork_url", :waveform_url => "sample_waveform_url", :tag_list => "sample_tag_list", :kind => "sample_kind", :genre => "sample_genre", :state => "sample_state", :description => "sample_description", :favoritings_count => -2147483648, :playback_count => -2147483648, :uploaded_on => "2014-12-31", :is_liked => false, :is_reposted => false)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val internalId = "sampleInternalId" // internal_id
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // slug
val title = "sampleTitle" // title
val artworkUrl = "sampleArtworkUrl" // artwork_url
val waveformUrl = "sampleWaveformUrl" // waveform_url
val tagList = "sampleTagList" // tag_list
val kind = "sampleKind" // kind
val genre = "sampleGenre" // genre
val state = "sampleState" // state
val description = "sampleDescription" // description
val favoritingsCount = -2147483648L // favoritings_count
val playbackCount = -2147483648L // playback_count
val uploadedOn = apiClient.parseDate("2014-12-31") // uploaded_on
val isLiked = false // is_liked
val isReposted = false // is_reposted
try {
val webApi = new WebApi
val response = webApi.trackDeleteTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackFindRelated
Find related tracks of a track
GET http://devcms.djs.com/api/tracks/:pk/find-related/
Find related tracks of a track
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| find_related | String | URL query string | Find all related tracks for a given single track | |
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| artist__slug | String | URL query string | Search and filter by all tracks by a particular artist slug | |
| my_followed_djs | String | URL query string | Get a list of tracks based on those of whom you the streaming user is following | |
| artist__id | String | URL query string | Search and filter by all tracks by a particular artist ID | |
| artist__genres__key | String | URL query string | Search and filter by all tracks by a particular key/slug of the genre table | |
| artist__genres__id | String | URL query string | Search and filter by all tracks by a particular genre ID of the genre table | |
| reposted_by | String | URL query string | Search by slug or ID of a stream user to get all the tracks they reposted | |
| listened_by | String | URL query string | Search by slug or ID of a stream user to get all the tracks they listened to |
Request preview:
GET /api/tracks/PK/find-related/?only_fields=ONLY_FIELDS&find_related=FIND_RELATED&page=PAGE&per_page=PER_PAGE&ordering=ORDERING&artist__slug=ARTIST__SLUG&my_followed_djs=MY_FOLLOWED_DJS&artist__id=ARTIST__ID&artist__genres__key=ARTIST__GENRES__KEY&artist__genres__id=ARTIST__GENRES__ID&reposted_by=REPOSTED_BY&listened_by=LISTENED_BY HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackPaginationSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var findRelated: String = "sampleFindRelated"; // Find all related tracks for a given single track
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var artistSlug: String = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
var myFollowedDjs: String = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
var artistId: String = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
var artistGenresKey: String = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
var artistGenresId: String = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
var repostedBy: String = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
var listenedBy: String = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try
{
var webApi: WebApi = new WebApi();
var response: TrackPaginationSerializer = webApi.track_find_related(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/<pk>/find-related/?only_fields=<only_fields>&find_related=<find_related>&page=<page>&per_page=<per_page>&ordering=<ordering>&artist__slug=<artist__slug>&my_followed_djs=<my_followed_djs>&artist__id=<artist__id>&artist__genres__key=<artist__genres__key>&artist__genres__id=<artist__genres__id>&reposted_by=<reposted_by>&listened_by=<listened_by>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPaginationSerializer response = webApi.TrackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['find_related'] = "sampleFindRelated"; // Find all related tracks for a given single track
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artist__slug'] = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
args['my_followed_djs'] = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
args['artist__id'] = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
args['artist__genres__key'] = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
args['artist__genres__id'] = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
args['reposted_by'] = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
args['listened_by'] = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
swagger.Web.trackFindRelated(args, function(response) {
/* success callback */
console.log("Result of Web.trackFindRelated");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackFindRelated:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *findRelated = @"sampleFindRelated"; // Find all related tracks for a given single track
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistSlug = @"sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
NSString *myFollowedDjs = @"sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
NSString *artistId = @"sampleArtistId"; // Search and filter by all tracks by a particular artist ID
NSString *artistGenresKey = @"sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
NSString *artistGenresId = @"sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
NSString *repostedBy = @"sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
NSString *listenedBy = @"sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackFindRelatedWithCompletionBlock:pk
onlyFields:onlyFields
findRelated:findRelated
page:page
perPage:perPage
ordering:ordering
artistSlug:artistSlug
myFollowedDjs:myFollowedDjs
artistId:artistId
artistGenresKey:artistGenresKey
artistGenresId:artistGenresId
repostedBy:repostedBy
listenedBy:listenedBy
completionHandler:^(SWGTrackPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
$myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
$artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
$artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
$artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
$repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
$listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackPaginationSerializer (model)
$response = $web_api->trackFindRelated($pk, $onlyFields, $findRelated, $page, $perPage, $ordering, $artistSlug, $myFollowedDjs, $artistId, $artistGenresKey, $artistGenresId, $repostedBy, $listenedBy);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackPaginationSerializer (model)
response = web_api.track_find_related(pk, only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by")
pprint(response)
# asynchronous call
# thread = web_api.track_find_related(pk, only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return TrackPaginationSerializer (model)
response = web_api.track_find_related(pk, :only_fields => "sample_only_fields", :find_related => "sample_find_related", :page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :artist__slug => "sample_artist__slug", :my_followed_djs => "sample_my_followed_djs", :artist__id => "sample_artist__id", :artist__genres__key => "sample_artist__genres__key", :artist__genres__id => "sample_artist__genres__id", :reposted_by => "sample_reposted_by", :listened_by => "sample_listened_by")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val findRelated = "sampleFindRelated" // Find all related tracks for a given single track
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistSlug = "sampleArtistSlug" // Search and filter by all tracks by a particular artist slug
val myFollowedDjs = "sampleMyFollowedDjs" // Get a list of tracks based on those of whom you the...
val artistId = "sampleArtistId" // Search and filter by all tracks by a particular artist ID
val artistGenresKey = "sampleArtistGenresKey" // Search and filter by all tracks by a particular key/slug...
val artistGenresId = "sampleArtistGenresId" // Search and filter by all tracks by a particular genre ID...
val repostedBy = "sampleRepostedBy" // Search by slug or ID of a stream user to get all the...
val listenedBy = "sampleListenedBy" // Search by slug or ID of a stream user to get all the...
try {
val webApi = new WebApi
val response = webApi.trackFindRelated(pk, onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackLike
Like a track with current logged in user
GET http://devcms.djs.com/api/tracks/:pk/like/
Like a track with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/tracks/PK/like/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_like(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackLike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/<pk>/like/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackLike(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackLike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackLike(args, function(response) {
/* success callback */
console.log("Result of Web.trackLike");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackLike:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackLikeWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackLike($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_like(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_like(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_like(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackLike(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackList
List all Tracks
GET http://devcms.djs.com/api/tracks/
List all Tracks
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| find_related | String | URL query string | Find all related tracks for a given single track | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| artist__slug | String | URL query string | Search and filter by all tracks by a particular artist slug | |
| my_followed_djs | String | URL query string | Get a list of tracks based on those of whom you the streaming user is following | |
| artist__id | String | URL query string | Search and filter by all tracks by a particular artist ID | |
| artist__genres__key | String | URL query string | Search and filter by all tracks by a particular key/slug of the genre table | |
| artist__genres__id | String | URL query string | Search and filter by all tracks by a particular genre ID of the genre table | |
| reposted_by | String | URL query string | Search by slug or ID of a stream user to get all the tracks they reposted | |
| listened_by | String | URL query string | Search by slug or ID of a stream user to get all the tracks they listened to |
Request preview:
GET /api/tracks/?page=PAGE&only_fields=ONLY_FIELDS&find_related=FIND_RELATED&per_page=PER_PAGE&ordering=ORDERING&artist__slug=ARTIST__SLUG&my_followed_djs=MY_FOLLOWED_DJS&artist__id=ARTIST__ID&artist__genres__key=ARTIST__GENRES__KEY&artist__genres__id=ARTIST__GENRES__ID&reposted_by=REPOSTED_BY&listened_by=LISTENED_BY HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackPaginationSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var findRelated: String = "sampleFindRelated"; // Find all related tracks for a given single track
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var artistSlug: String = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
var myFollowedDjs: String = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
var artistId: String = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
var artistGenresKey: String = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
var artistGenresId: String = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
var repostedBy: String = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
var listenedBy: String = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try
{
var webApi: WebApi = new WebApi();
var response: TrackPaginationSerializer = webApi.track_list(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/?page=<page>&only_fields=<only_fields>&find_related=<find_related>&per_page=<per_page>&ordering=<ordering>&artist__slug=<artist__slug>&my_followed_djs=<my_followed_djs>&artist__id=<artist__id>&artist__genres__key=<artist__genres__key>&artist__genres__id=<artist__genres__id>&reposted_by=<reposted_by>&listened_by=<listened_by>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPaginationSerializer response = webApi.TrackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['find_related'] = "sampleFindRelated"; // Find all related tracks for a given single track
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artist__slug'] = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
args['my_followed_djs'] = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
args['artist__id'] = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
args['artist__genres__key'] = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
args['artist__genres__id'] = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
args['reposted_by'] = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
args['listened_by'] = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
swagger.Web.trackList(args, function(response) {
/* success callback */
console.log("Result of Web.trackList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *findRelated = @"sampleFindRelated"; // Find all related tracks for a given single track
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistSlug = @"sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
NSString *myFollowedDjs = @"sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
NSString *artistId = @"sampleArtistId"; // Search and filter by all tracks by a particular artist ID
NSString *artistGenresKey = @"sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
NSString *artistGenresId = @"sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
NSString *repostedBy = @"sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
NSString *listenedBy = @"sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackListWithCompletionBlock:page
onlyFields:onlyFields
findRelated:findRelated
perPage:perPage
ordering:ordering
artistSlug:artistSlug
myFollowedDjs:myFollowedDjs
artistId:artistId
artistGenresKey:artistGenresKey
artistGenresId:artistGenresId
repostedBy:repostedBy
listenedBy:listenedBy
completionHandler:^(SWGTrackPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
$myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
$artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
$artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
$artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
$repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
$listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackPaginationSerializer (model)
$response = $web_api->trackList($page, $onlyFields, $findRelated, $perPage, $ordering, $artistSlug, $myFollowedDjs, $artistId, $artistGenresKey, $artistGenresId, $repostedBy, $listenedBy);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackPaginationSerializer (model)
response = web_api.track_list(page="sample_page", only_fields="sample_only_fields", find_related="sample_find_related", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by")
pprint(response)
# asynchronous call
# thread = web_api.track_list(page="sample_page", only_fields="sample_only_fields", find_related="sample_find_related", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return TrackPaginationSerializer (model)
response = web_api.track_list(:page => "sample_page", :only_fields => "sample_only_fields", :find_related => "sample_find_related", :per_page => "sample_per_page", :ordering => "sample_ordering", :artist__slug => "sample_artist__slug", :my_followed_djs => "sample_my_followed_djs", :artist__id => "sample_artist__id", :artist__genres__key => "sample_artist__genres__key", :artist__genres__id => "sample_artist__genres__id", :reposted_by => "sample_reposted_by", :listened_by => "sample_listened_by")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val findRelated = "sampleFindRelated" // Find all related tracks for a given single track
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistSlug = "sampleArtistSlug" // Search and filter by all tracks by a particular artist slug
val myFollowedDjs = "sampleMyFollowedDjs" // Get a list of tracks based on those of whom you the...
val artistId = "sampleArtistId" // Search and filter by all tracks by a particular artist ID
val artistGenresKey = "sampleArtistGenresKey" // Search and filter by all tracks by a particular key/slug...
val artistGenresId = "sampleArtistGenresId" // Search and filter by all tracks by a particular genre ID...
val repostedBy = "sampleRepostedBy" // Search by slug or ID of a stream user to get all the...
val listenedBy = "sampleListenedBy" // Search by slug or ID of a stream user to get all the...
try {
val webApi = new WebApi
val response = webApi.trackList(page, onlyFields, findRelated, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackPlay
Get the audio URL(s) for the given track
POST http://devcms.djs.com/api/tracks/play/
Get the audio URL(s) for the given track.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| artist_sk_id | String | HTTP Form | SK ID of the artist | |
| track_internal_id | String | HTTP Form | Internal ID of the track | |
| ip_address | String | HTTP Form | IP Address of requestor |
Request preview:
POST /api/tracks/play/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
artist_sk_id=ARTIST_SK_ID&ip_address=IP_ADDRESS&track_internal_id=TRACK_INTERNAL_IDThis endpoint returns TrackPlayResponseSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var artistSkId: String = "sampleArtistSkId"; // SK ID of the artist
var trackInternalId: String = "sampleTrackInternalId"; // Internal ID of the track
var ipAddress: String = "sampleIpAddress"; // IP Address of requestor
try
{
var webApi: WebApi = new WebApi();
var response: TrackPlayResponseSerializer = webApi.track_play(artistSkId, trackInternalId, ipAddress);
}
catch (e:Error)
{
trace(e)
}
String artistSkId = "sampleArtistSkId"; // SK ID of the artist
String trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
String ipAddress = "sampleIpAddress"; // IP Address of requestor
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlay(artistSkId, trackInternalId, ipAddress);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/tracks/play/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "artist_sk_id=<artist_sk_id>" \
-d "track_internal_id=<track_internal_id>" \
-d "ip_address=<ip_address>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String artistSkId = "sampleArtistSkId"; // SK ID of the artist
String trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
String ipAddress = "sampleIpAddress"; // IP Address of requestor
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPlayResponseSerializer response = webApi.TrackPlay(artistSkId, trackInternalId, ipAddress);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String artistSkId = "sampleArtistSkId"; // SK ID of the artist
String trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
String ipAddress = "sampleIpAddress"; // IP Address of requestor
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlay(artistSkId, trackInternalId, ipAddress);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['artist_sk_id'] = "sampleArtistSkId"; // SK ID of the artist
args['track_internal_id'] = "sampleTrackInternalId"; // Internal ID of the track
args['ip_address'] = "sampleIpAddress"; // IP Address of requestor
swagger.Web.trackPlay(args, function(response) {
/* success callback */
console.log("Result of Web.trackPlay");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackPlay:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *artistSkId = @"sampleArtistSkId"; // SK ID of the artist
NSString *trackInternalId = @"sampleTrackInternalId"; // Internal ID of the track
NSString *ipAddress = @"sampleIpAddress"; // IP Address of requestor
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackPlayWithCompletionBlock:artistSkId
trackInternalId:trackInternalId
ipAddress:ipAddress
completionHandler:^(SWGTrackPlayResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$artistSkId = "sampleArtistSkId"; // SK ID of the artist
$trackInternalId = "sampleTrackInternalId"; // Internal ID of the track
$ipAddress = "sampleIpAddress"; // IP Address of requestor
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackPlayResponseSerializer (model)
$response = $web_api->trackPlay($artistSkId, $trackInternalId, $ipAddress);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
artist_sk_id = "sample_artist_sk_id" # SK ID of the artist
track_internal_id = "sample_track_internal_id" # Internal ID of the track
ip_address = "sample_ip_address" # IP Address of requestor
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackPlayResponseSerializer (model)
response = web_api.track_play(artist_sk_id, track_internal_id, ip_address)
pprint(response)
# asynchronous call
# thread = web_api.track_play(artist_sk_id, track_internal_id, ip_address, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
artist_sk_id = "sample_artist_sk_id" # SK ID of the artist
track_internal_id = "sample_track_internal_id" # Internal ID of the track
ip_address = "sample_ip_address" # IP Address of requestor
begin
web_api = DjsApi::WebApi.new
# return TrackPlayResponseSerializer (model)
response = web_api.track_play(artist_sk_id, track_internal_id, ip_address)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val artistSkId = "sampleArtistSkId" // SK ID of the artist
val trackInternalId = "sampleTrackInternalId" // Internal ID of the track
val ipAddress = "sampleIpAddress" // IP Address of requestor
try {
val webApi = new WebApi
val response = webApi.trackPlay(artistSkId, trackInternalId, ipAddress)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackPlayNext
Play the next track given a list of played songs and a current sk_id, internal_id and mode
POST http://devcms.djs.com/api/tracks/play-next/
Play the next track given a list of played songs and a current sk_id, internal_id and mode
| Name | Type | Location | Description | |
|---|---|---|---|---|
| current_artist_sk_id | String | HTTP Form | Internal ID of the track | |
| current_track_internal_id | String | HTTP Form | SK ID of the artist | |
| mode | String | HTTP Form | Play Mode (Valid values are "artist", "genre", "trending", "recent") | |
| ip_address | String | HTTP Form | IP Address of requestor | |
| genre_key | String | HTTP Form | If you use genre as a mode, this is required | |
| played_tracks | String | HTTP Form | A JSON object with a list of all played tracks to filter out possible next matches. |
Request preview:
POST /api/tracks/play-next/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
current_artist_sk_id=CURRENT_ARTIST_SK_ID¤t_track_internal_id=CURRENT_TRACK_INTERNAL_ID&genre_key=GENRE_KEY&ip_address=IP_ADDRESS&mode=MODE&played_tracks=PLAYED_TRACKSThis endpoint returns TrackPlayResponseSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var currentArtistSkId: String = "sampleCurrentArtistSkId"; // Internal ID of the track
var currentTrackInternalId: String = "sampleCurrentTrackInternalId"; // SK ID of the artist
var mode: String = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
var ipAddress: String = "sampleIpAddress"; // IP Address of requestor
var genreKey: String = "sampleGenreKey"; // If you use genre as a mode, this is required
var playedTracks: String = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try
{
var webApi: WebApi = new WebApi();
var response: TrackPlayResponseSerializer = webApi.track_play_next(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
}
catch (e:Error)
{
trace(e)
}
String currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
String currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
String mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
String ipAddress = "sampleIpAddress"; // IP Address of requestor
String genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
String playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/tracks/play-next/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "current_artist_sk_id=<current_artist_sk_id>" \
-d "current_track_internal_id=<current_track_internal_id>" \
-d "mode=<mode>" \
-d "ip_address=<ip_address>" \
-d "genre_key=<genre_key>" \
-d "played_tracks=<played_tracks>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
String currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
String mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
String ipAddress = "sampleIpAddress"; // IP Address of requestor
String genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
String playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPlayResponseSerializer response = webApi.TrackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
String currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
String mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
String ipAddress = "sampleIpAddress"; // IP Address of requestor
String genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
String playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try {
WebApi webApi = new WebApi();
TrackPlayResponseSerializer response = webApi.trackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['current_artist_sk_id'] = "sampleCurrentArtistSkId"; // Internal ID of the track
args['current_track_internal_id'] = "sampleCurrentTrackInternalId"; // SK ID of the artist
args['mode'] = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
args['ip_address'] = "sampleIpAddress"; // IP Address of requestor
args['genre_key'] = "sampleGenreKey"; // If you use genre as a mode, this is required
args['played_tracks'] = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
swagger.Web.trackPlayNext(args, function(response) {
/* success callback */
console.log("Result of Web.trackPlayNext");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackPlayNext:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *currentArtistSkId = @"sampleCurrentArtistSkId"; // Internal ID of the track
NSString *currentTrackInternalId = @"sampleCurrentTrackInternalId"; // SK ID of the artist
NSString *mode = @"sampleMode"; // Play Mode (Valid values are "artist", "genre",...
NSString *ipAddress = @"sampleIpAddress"; // IP Address of requestor
NSString *genreKey = @"sampleGenreKey"; // If you use genre as a mode, this is required
NSString *playedTracks = @"samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackPlayNextWithCompletionBlock:currentArtistSkId
currentTrackInternalId:currentTrackInternalId
mode:mode
ipAddress:ipAddress
genreKey:genreKey
playedTracks:playedTracks
completionHandler:^(SWGTrackPlayResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$currentArtistSkId = "sampleCurrentArtistSkId"; // Internal ID of the track
$currentTrackInternalId = "sampleCurrentTrackInternalId"; // SK ID of the artist
$mode = "sampleMode"; // Play Mode (Valid values are "artist", "genre",...
$ipAddress = "sampleIpAddress"; // IP Address of requestor
$genreKey = "sampleGenreKey"; // If you use genre as a mode, this is required
$playedTracks = "samplePlayedTracks"; // A JSON object with a list of all played tracks to filter...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackPlayResponseSerializer (model)
$response = $web_api->trackPlayNext($currentArtistSkId, $currentTrackInternalId, $mode, $ipAddress, $genreKey, $playedTracks);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
current_artist_sk_id = "sample_current_artist_sk_id" # Internal ID of the track
current_track_internal_id = "sample_current_track_internal_id" # SK ID of the artist
mode = "sample_mode" # Play Mode (Valid values are "artist", "genre",...
ip_address = "sample_ip_address" # IP Address of requestor
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackPlayResponseSerializer (model)
response = web_api.track_play_next(current_artist_sk_id, current_track_internal_id, mode, ip_address, genre_key="sample_genre_key", played_tracks="sample_played_tracks")
pprint(response)
# asynchronous call
# thread = web_api.track_play_next(current_artist_sk_id, current_track_internal_id, mode, ip_address, genre_key="sample_genre_key", played_tracks="sample_played_tracks", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
current_artist_sk_id = "sample_current_artist_sk_id" # Internal ID of the track
current_track_internal_id = "sample_current_track_internal_id" # SK ID of the artist
mode = "sample_mode" # Play Mode (Valid values are "artist", "genre",...
ip_address = "sample_ip_address" # IP Address of requestor
begin
web_api = DjsApi::WebApi.new
# return TrackPlayResponseSerializer (model)
response = web_api.track_play_next(current_artist_sk_id, current_track_internal_id, mode, ip_address, :genre_key => "sample_genre_key", :played_tracks => "sample_played_tracks")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val currentArtistSkId = "sampleCurrentArtistSkId" // Internal ID of the track
val currentTrackInternalId = "sampleCurrentTrackInternalId" // SK ID of the artist
val mode = "sampleMode" // Play Mode (Valid values are "artist", "genre",...
val ipAddress = "sampleIpAddress" // IP Address of requestor
val genreKey = "sampleGenreKey" // If you use genre as a mode, this is required
val playedTracks = "samplePlayedTracks" // A JSON object with a list of all played tracks to filter...
try {
val webApi = new WebApi
val response = webApi.trackPlayNext(currentArtistSkId, currentTrackInternalId, mode, ipAddress, genreKey, playedTracks)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackPlayUpdate
Updates a track play session with new duration and max timecode values
POST http://devcms.djs.com/api/tracks/play-update/
Updates a track play session with new duration and max timecode values.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| analytics_key | String | HTTP Form | The analytics key provided by the ``play`` API call. | |
| duration | String | HTTP Form | Duration of the audio play session. | |
| max_timecode | String | HTTP Form | The max timecode played during this session. |
Request preview:
POST /api/tracks/play-update/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
analytics_key=ANALYTICS_KEY&duration=DURATION&max_timecode=MAX_TIMECODEThis endpoint returns TrackPlayUpdateResponseSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var analyticsKey: String = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
var duration: String = "sampleDuration"; // Duration of the audio play session.
var maxTimecode: String = "sampleMaxTimecode"; // The max timecode played during this session.
try
{
var webApi: WebApi = new WebApi();
var response: TrackPlayUpdateResponseSerializer = webApi.track_play_update(analyticsKey, duration, maxTimecode);
}
catch (e:Error)
{
trace(e)
}
String analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
String duration = "sampleDuration"; // Duration of the audio play session.
String maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try {
WebApi webApi = new WebApi();
TrackPlayUpdateResponseSerializer response = webApi.trackPlayUpdate(analyticsKey, duration, maxTimecode);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/tracks/play-update/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "analytics_key=<analytics_key>" \
-d "duration=<duration>" \
-d "max_timecode=<max_timecode>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
String duration = "sampleDuration"; // Duration of the audio play session.
String maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPlayUpdateResponseSerializer response = webApi.TrackPlayUpdate(analyticsKey, duration, maxTimecode);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
String duration = "sampleDuration"; // Duration of the audio play session.
String maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try {
WebApi webApi = new WebApi();
TrackPlayUpdateResponseSerializer response = webApi.trackPlayUpdate(analyticsKey, duration, maxTimecode);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['analytics_key'] = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
args['duration'] = "sampleDuration"; // Duration of the audio play session.
args['max_timecode'] = "sampleMaxTimecode"; // The max timecode played during this session.
swagger.Web.trackPlayUpdate(args, function(response) {
/* success callback */
console.log("Result of Web.trackPlayUpdate");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackPlayUpdate:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *analyticsKey = @"sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
NSString *duration = @"sampleDuration"; // Duration of the audio play session.
NSString *maxTimecode = @"sampleMaxTimecode"; // The max timecode played during this session.
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackPlayUpdateWithCompletionBlock:analyticsKey
duration:duration
maxTimecode:maxTimecode
completionHandler:^(SWGTrackPlayUpdateResponseSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$analyticsKey = "sampleAnalyticsKey"; // The analytics key provided by the ``play`` API call.
$duration = "sampleDuration"; // Duration of the audio play session.
$maxTimecode = "sampleMaxTimecode"; // The max timecode played during this session.
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackPlayUpdateResponseSerializer (model)
$response = $web_api->trackPlayUpdate($analyticsKey, $duration, $maxTimecode);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
analytics_key = "sample_analytics_key" # The analytics key provided by the ``play`` API call.
duration = "sample_duration" # Duration of the audio play session.
max_timecode = "sample_max_timecode" # The max timecode played during this session.
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackPlayUpdateResponseSerializer (model)
response = web_api.track_play_update(analytics_key, duration, max_timecode)
pprint(response)
# asynchronous call
# thread = web_api.track_play_update(analytics_key, duration, max_timecode, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
analytics_key = "sample_analytics_key" # The analytics key provided by the ``play`` API call.
duration = "sample_duration" # Duration of the audio play session.
max_timecode = "sample_max_timecode" # The max timecode played during this session.
begin
web_api = DjsApi::WebApi.new
# return TrackPlayUpdateResponseSerializer (model)
response = web_api.track_play_update(analytics_key, duration, max_timecode)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val analyticsKey = "sampleAnalyticsKey" // The analytics key provided by the ``play`` API call.
val duration = "sampleDuration" // Duration of the audio play session.
val maxTimecode = "sampleMaxTimecode" // The max timecode played during this session.
try {
val webApi = new WebApi
val response = webApi.trackPlayUpdate(analyticsKey, duration, maxTimecode)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackRepost
Repost a track with current logged in user
GET http://devcms.djs.com/api/tracks/:pk/repost/
Repost a track with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/tracks/PK/repost/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_repost(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/<pk>/repost/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackRepost(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackRepost(args, function(response) {
/* success callback */
console.log("Result of Web.trackRepost");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackRepost:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackRepostWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackRepost($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_repost(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_repost(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_repost(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackRepost(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackRetrieve
Fetch a single Track by Slug or ID
GET http://devcms.djs.com/api/tracks/:pk/
Fetch a single Track by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/tracks/PK/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_retrieve(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/<pk>/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackRetrieve(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackRetrieve(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.trackRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackRetrieveWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackRetrieve($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_retrieve(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_retrieve(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_retrieve(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackRetrieve(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackTrending
Get the latest trending tracks
GET http://devcms.djs.com/api/tracks/trending/
Get the latest trending tracks
| Name | Type | Location | Description | |
|---|---|---|---|---|
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| find_related | String | URL query string | Find all related tracks for a given single track | |
| page | String | URL query string | Paginate the resultset | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| artist__slug | String | URL query string | Search and filter by all tracks by a particular artist slug | |
| my_followed_djs | String | URL query string | Get a list of tracks based on those of whom you the streaming user is following | |
| artist__id | String | URL query string | Search and filter by all tracks by a particular artist ID | |
| artist__genres__key | String | URL query string | Search and filter by all tracks by a particular key/slug of the genre table | |
| artist__genres__id | String | URL query string | Search and filter by all tracks by a particular genre ID of the genre table | |
| reposted_by | String | URL query string | Search by slug or ID of a stream user to get all the tracks they reposted | |
| listened_by | String | URL query string | Search by slug or ID of a stream user to get all the tracks they listened to | |
| trending__genres__key | String | URL query string | Additionally filter the genres (by key/slug) of the trending tracks | |
| trending__genres__id | String | URL query string | Additionally filter the genres (by ID) of the trending tracks |
Request preview:
GET /api/tracks/trending/?only_fields=ONLY_FIELDS&find_related=FIND_RELATED&page=PAGE&per_page=PER_PAGE&ordering=ORDERING&artist__slug=ARTIST__SLUG&my_followed_djs=MY_FOLLOWED_DJS&artist__id=ARTIST__ID&artist__genres__key=ARTIST__GENRES__KEY&artist__genres__id=ARTIST__GENRES__ID&reposted_by=REPOSTED_BY&listened_by=LISTENED_BY&trending__genres__key=TRENDING__GENRES__KEY&trending__genres__id=TRENDING__GENRES__ID HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackPaginationSerializer (model)
No error response defined
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var findRelated: String = "sampleFindRelated"; // Find all related tracks for a given single track
var page: String = "samplePage"; // Paginate the resultset
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var artistSlug: String = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
var myFollowedDjs: String = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
var artistId: String = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
var artistGenresKey: String = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
var artistGenresId: String = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
var repostedBy: String = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
var listenedBy: String = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
var trendingGenresKey: String = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
var trendingGenresId: String = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try
{
var webApi: WebApi = new WebApi();
var response: TrackPaginationSerializer = webApi.track_trending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
}
catch (e:Error)
{
trace(e)
}
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
String trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
String trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/trending/?only_fields=<only_fields>&find_related=<find_related>&page=<page>&per_page=<per_page>&ordering=<ordering>&artist__slug=<artist__slug>&my_followed_djs=<my_followed_djs>&artist__id=<artist__id>&artist__genres__key=<artist__genres__key>&artist__genres__id=<artist__genres__id>&reposted_by=<reposted_by>&listened_by=<listened_by>&trending__genres__key=<trending__genres__key>&trending__genres__id=<trending__genres__id>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
String trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
String trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackPaginationSerializer response = webApi.TrackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
String page = "samplePage"; // Paginate the resultset
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
String myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
String artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
String artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
String artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
String repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
String listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
String trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
String trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try {
WebApi webApi = new WebApi();
TrackPaginationSerializer response = webApi.trackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['find_related'] = "sampleFindRelated"; // Find all related tracks for a given single track
args['page'] = "samplePage"; // Paginate the resultset
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['artist__slug'] = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
args['my_followed_djs'] = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
args['artist__id'] = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
args['artist__genres__key'] = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
args['artist__genres__id'] = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
args['reposted_by'] = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
args['listened_by'] = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
args['trending__genres__key'] = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
args['trending__genres__id'] = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
swagger.Web.trackTrending(args, function(response) {
/* success callback */
console.log("Result of Web.trackTrending");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackTrending:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *findRelated = @"sampleFindRelated"; // Find all related tracks for a given single track
NSString *page = @"samplePage"; // Paginate the resultset
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *artistSlug = @"sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
NSString *myFollowedDjs = @"sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
NSString *artistId = @"sampleArtistId"; // Search and filter by all tracks by a particular artist ID
NSString *artistGenresKey = @"sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
NSString *artistGenresId = @"sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
NSString *repostedBy = @"sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
NSString *listenedBy = @"sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
NSString *trendingGenresKey = @"sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
NSString *trendingGenresId = @"sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackTrendingWithCompletionBlock:onlyFields
findRelated:findRelated
page:page
perPage:perPage
ordering:ordering
artistSlug:artistSlug
myFollowedDjs:myFollowedDjs
artistId:artistId
artistGenresKey:artistGenresKey
artistGenresId:artistGenresId
repostedBy:repostedBy
listenedBy:listenedBy
trendingGenresKey:trendingGenresKey
trendingGenresId:trendingGenresId
completionHandler:^(SWGTrackPaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$findRelated = "sampleFindRelated"; // Find all related tracks for a given single track
$page = "samplePage"; // Paginate the resultset
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$artistSlug = "sampleArtistSlug"; // Search and filter by all tracks by a particular artist slug
$myFollowedDjs = "sampleMyFollowedDjs"; // Get a list of tracks based on those of whom you the...
$artistId = "sampleArtistId"; // Search and filter by all tracks by a particular artist ID
$artistGenresKey = "sampleArtistGenresKey"; // Search and filter by all tracks by a particular key/slug...
$artistGenresId = "sampleArtistGenresId"; // Search and filter by all tracks by a particular genre ID...
$repostedBy = "sampleRepostedBy"; // Search by slug or ID of a stream user to get all the...
$listenedBy = "sampleListenedBy"; // Search by slug or ID of a stream user to get all the...
$trendingGenresKey = "sampleTrendingGenresKey"; // Additionally filter the genres (by key/slug) of the...
$trendingGenresId = "sampleTrendingGenresId"; // Additionally filter the genres (by ID) of the trending...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackPaginationSerializer (model)
$response = $web_api->trackTrending($onlyFields, $findRelated, $page, $perPage, $ordering, $artistSlug, $myFollowedDjs, $artistId, $artistGenresKey, $artistGenresId, $repostedBy, $listenedBy, $trendingGenresKey, $trendingGenresId);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackPaginationSerializer (model)
response = web_api.track_trending(only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", trending__genres__key="sample_trending__genres__key", trending__genres__id="sample_trending__genres__id")
pprint(response)
# asynchronous call
# thread = web_api.track_trending(only_fields="sample_only_fields", find_related="sample_find_related", page="sample_page", per_page="sample_per_page", ordering="sample_ordering", artist__slug="sample_artist__slug", my_followed_djs="sample_my_followed_djs", artist__id="sample_artist__id", artist__genres__key="sample_artist__genres__key", artist__genres__id="sample_artist__genres__id", reposted_by="sample_reposted_by", listened_by="sample_listened_by", trending__genres__key="sample_trending__genres__key", trending__genres__id="sample_trending__genres__id", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return TrackPaginationSerializer (model)
response = web_api.track_trending(:only_fields => "sample_only_fields", :find_related => "sample_find_related", :page => "sample_page", :per_page => "sample_per_page", :ordering => "sample_ordering", :artist__slug => "sample_artist__slug", :my_followed_djs => "sample_my_followed_djs", :artist__id => "sample_artist__id", :artist__genres__key => "sample_artist__genres__key", :artist__genres__id => "sample_artist__genres__id", :reposted_by => "sample_reposted_by", :listened_by => "sample_listened_by", :trending__genres__key => "sample_trending__genres__key", :trending__genres__id => "sample_trending__genres__id")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val findRelated = "sampleFindRelated" // Find all related tracks for a given single track
val page = "samplePage" // Paginate the resultset
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val artistSlug = "sampleArtistSlug" // Search and filter by all tracks by a particular artist slug
val myFollowedDjs = "sampleMyFollowedDjs" // Get a list of tracks based on those of whom you the...
val artistId = "sampleArtistId" // Search and filter by all tracks by a particular artist ID
val artistGenresKey = "sampleArtistGenresKey" // Search and filter by all tracks by a particular key/slug...
val artistGenresId = "sampleArtistGenresId" // Search and filter by all tracks by a particular genre ID...
val repostedBy = "sampleRepostedBy" // Search by slug or ID of a stream user to get all the...
val listenedBy = "sampleListenedBy" // Search by slug or ID of a stream user to get all the...
val trendingGenresKey = "sampleTrendingGenresKey" // Additionally filter the genres (by key/slug) of the...
val trendingGenresId = "sampleTrendingGenresId" // Additionally filter the genres (by ID) of the trending...
try {
val webApi = new WebApi
val response = webApi.trackTrending(onlyFields, findRelated, page, perPage, ordering, artistSlug, myFollowedDjs, artistId, artistGenresKey, artistGenresId, repostedBy, listenedBy, trendingGenresKey, trendingGenresId)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackUnlike
Unlike a track with current logged in user
GET http://devcms.djs.com/api/tracks/:pk/unlike/
Unlike a track with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/tracks/PK/unlike/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_unlike(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnlike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/<pk>/unlike/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackUnlike(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnlike(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackUnlike(args, function(response) {
/* success callback */
console.log("Result of Web.trackUnlike");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackUnlike:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackUnlikeWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackUnlike($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_unlike(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_unlike(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_unlike(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackUnlike(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackUnrepost
Un Repost a track with current logged in user
GET http://devcms.djs.com/api/tracks/:pk/unrepost/
Un Repost a track with current logged in user
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk |
Request preview:
GET /api/tracks/PK/unrepost/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns TrackSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_unrepost(pk);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnrepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/tracks/<pk>/unrepost/" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackUnrepost(pk);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUnrepost(pk);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
swagger.Web.trackUnrepost(args, function(response) {
/* success callback */
console.log("Result of Web.trackUnrepost");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackUnrepost:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackUnrepostWithCompletionBlock:pk
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackUnrepost($pk);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_unrepost(pk)
pprint(response)
# asynchronous call
# thread = web_api.track_unrepost(pk, callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_unrepost(pk)
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
try {
val webApi = new WebApi
val response = webApi.trackUnrepost(pk)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
trackUpdateTrack
Update a track
POST http://devcms.djs.com/api/tracks/:pk/update-track/
Update a track.
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| internal_id | String | HTTP Form | internal_id | |
| meta_title | String | HTTP Form | meta_title | |
| meta_description | String | HTTP Form | meta_description | |
| slug | String | HTTP Form | Slug of track | |
| title | String | HTTP Form | Track Title | |
| artwork_url | String | HTTP Form | artwork_url | |
| waveform_url | String | HTTP Form | waveform_url | |
| tag_list | String | HTTP Form | tag_list | |
| kind | String | HTTP Form | kind | |
| genre | String | HTTP Form | genre | |
| state | String | HTTP Form | state | |
| description | String | HTTP Form | Track Description | |
| favoritings_count | Integer (signed 64 bits) | HTTP Form | favoritings_count Minimum: -2147483648 Maximum: 2147483647 | |
| playback_count | Integer (signed 64 bits) | HTTP Form | playback_count Minimum: -2147483648 Maximum: 2147483647 | |
| uploaded_on | String (date) | HTTP Form | uploaded_on | |
| is_liked | Boolean | HTTP Form | is_liked | |
| is_reposted | Boolean | HTTP Form | is_reposted | |
| image_download_url | String | HTTP Form | A publicly accessible URL so the file can be downloaded and dumped to S3 in the appropriate location | |
| duration | String | HTTP Form | Number of milliseconds of the track | |
| original_content_size | String | HTTP Form | Original Content size |
Request preview:
POST /api/tracks/PK/update-track/ HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEY
Content-Type: application/x-www-form-urlencoded
artwork_url=ARTWORK_URL&description=DESCRIPTION&duration=DURATION&favoritings_count=-2147483648&genre=GENRE&image_download_url=IMAGE_DOWNLOAD_URL&internal_id=INTERNAL_ID&is_liked=IS_LIKED&is_reposted=IS_REPOSTED&kind=KIND&meta_description=META_DESCRIPTION&meta_title=META_TITLE&original_content_size=ORIGINAL_CONTENT_SIZE&playback_count=-2147483648&slug=SLUG&state=STATE&tag_list=TAG_LIST&title=TITLE&uploaded_on=UPLOADED_ON&waveform_url=WAVEFORM_URLThis endpoint returns TrackSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var internalId: String = "sampleInternalId"; // internal_id
var metaTitle: String = "sampleMetaTitle"; // meta_title
var metaDescription: String = "sampleMetaDescription"; // meta_description
var slug: String = "sampleSlug"; // Slug of track
var title: String = "sampleTitle"; // Track Title
var artworkUrl: String = "sampleArtworkUrl"; // artwork_url
var waveformUrl: String = "sampleWaveformUrl"; // waveform_url
var tagList: String = "sampleTagList"; // tag_list
var kind: String = "sampleKind"; // kind
var genre: String = "sampleGenre"; // genre
var state: String = "sampleState"; // state
var description: String = "sampleDescription"; // Track Description
var favoritingsCount: Number = -2147483648; // favoritings_count
var playbackCount: Number = -2147483648; // playback_count
var uploadedOn: String = "sampleUploadedOn"; // uploaded_on
var isLiked: Boolean = True; // is_liked
var isReposted: Boolean = True; // is_reposted
var imageDownloadUrl: String = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
var duration: String = "sampleDuration"; // Number of milliseconds of the track
var originalContentSize: String = "sampleOriginalContentSize"; // Original Content size
try
{
var webApi: WebApi = new WebApi();
var response: TrackSerializer = webApi.track_update_track(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // Slug of track
String title = "sampleTitle"; // Track Title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // Track Description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl -X POST --include "http://devcms.djs.com/api/tracks/<pk>/update-track/" \
-H "Authorization: Token CLIENT_API_KEY" \
-d "internal_id=<internal_id>" \
-d "meta_title=<meta_title>" \
-d "meta_description=<meta_description>" \
-d "slug=<slug>" \
-d "title=<title>" \
-d "artwork_url=<artwork_url>" \
-d "waveform_url=<waveform_url>" \
-d "tag_list=<tag_list>" \
-d "kind=<kind>" \
-d "genre=<genre>" \
-d "state=<state>" \
-d "description=<description>" \
-d "favoritings_count=-2147483648" \
-d "playback_count=-2147483648" \
-d "uploaded_on=<uploaded_on>" \
-d "is_liked=<is_liked>" \
-d "is_reposted=<is_reposted>" \
-d "image_download_url=<image_download_url>" \
-d "duration=<duration>" \
-d "original_content_size=<original_content_size>"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // Slug of track
String title = "sampleTitle"; // Track Title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // Track Description
long? favoritingsCount = -2147483648; // favoritings_count
long? playbackCount = -2147483648; // playback_count
DateTime? uploadedOn = DateTime.Parse("2014-12-31"); // uploaded_on
bool? isLiked = false; // is_liked
bool? isReposted = false; // is_reposted
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
TrackSerializer response = webApi.TrackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String internalId = "sampleInternalId"; // internal_id
String metaTitle = "sampleMetaTitle"; // meta_title
String metaDescription = "sampleMetaDescription"; // meta_description
String slug = "sampleSlug"; // Slug of track
String title = "sampleTitle"; // Track Title
String artworkUrl = "sampleArtworkUrl"; // artwork_url
String waveformUrl = "sampleWaveformUrl"; // waveform_url
String tagList = "sampleTagList"; // tag_list
String kind = "sampleKind"; // kind
String genre = "sampleGenre"; // genre
String state = "sampleState"; // state
String description = "sampleDescription"; // Track Description
Long favoritingsCount = new Long(-2147483648); // favoritings_count
Long playbackCount = new Long(-2147483648); // playback_count
Date uploadedOn = apiClient.parseDate("2014-12-31"); // uploaded_on
Boolean isLiked = false; // is_liked
Boolean isReposted = false; // is_reposted
String imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
String duration = "sampleDuration"; // Number of milliseconds of the track
String originalContentSize = "sampleOriginalContentSize"; // Original Content size
try {
WebApi webApi = new WebApi();
TrackSerializer response = webApi.trackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['internal_id'] = "sampleInternalId"; // internal_id
args['meta_title'] = "sampleMetaTitle"; // meta_title
args['meta_description'] = "sampleMetaDescription"; // meta_description
args['slug'] = "sampleSlug"; // Slug of track
args['title'] = "sampleTitle"; // Track Title
args['artwork_url'] = "sampleArtworkUrl"; // artwork_url
args['waveform_url'] = "sampleWaveformUrl"; // waveform_url
args['tag_list'] = "sampleTagList"; // tag_list
args['kind'] = "sampleKind"; // kind
args['genre'] = "sampleGenre"; // genre
args['state'] = "sampleState"; // state
args['description'] = "sampleDescription"; // Track Description
args['favoritings_count'] = -2147483648; // favoritings_count
args['playback_count'] = -2147483648; // playback_count
args['uploaded_on'] = "2014-12-31"; // uploaded_on
args['is_liked'] = false; // is_liked
args['is_reposted'] = false; // is_reposted
args['image_download_url'] = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
args['duration'] = "sampleDuration"; // Number of milliseconds of the track
args['original_content_size'] = "sampleOriginalContentSize"; // Original Content size
swagger.Web.trackUpdateTrack(args, function(response) {
/* success callback */
console.log("Result of Web.trackUpdateTrack");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.trackUpdateTrack:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *internalId = @"sampleInternalId"; // internal_id
NSString *metaTitle = @"sampleMetaTitle"; // meta_title
NSString *metaDescription = @"sampleMetaDescription"; // meta_description
NSString *slug = @"sampleSlug"; // Slug of track
NSString *title = @"sampleTitle"; // Track Title
NSString *artworkUrl = @"sampleArtworkUrl"; // artwork_url
NSString *waveformUrl = @"sampleWaveformUrl"; // waveform_url
NSString *tagList = @"sampleTagList"; // tag_list
NSString *kind = @"sampleKind"; // kind
NSString *genre = @"sampleGenre"; // genre
NSString *state = @"sampleState"; // state
NSString *description = @"sampleDescription"; // Track Description
NSNumber *favoritingsCount = @-2147483648; // favoritings_count
NSNumber *playbackCount = @-2147483648; // playback_count
NSDate *uploadedOn = @"sampleUploadedOn"; // uploaded_on
NSNumber *isLiked = @NO; // is_liked
NSNumber *isReposted = @NO; // is_reposted
NSString *imageDownloadUrl = @"sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
NSString *duration = @"sampleDuration"; // Number of milliseconds of the track
NSString *originalContentSize = @"sampleOriginalContentSize"; // Original Content size
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi trackUpdateTrackWithCompletionBlock:pk
internalId:internalId
metaTitle:metaTitle
metaDescription:metaDescription
slug:slug
title:title
artworkUrl:artworkUrl
waveformUrl:waveformUrl
tagList:tagList
kind:kind
genre:genre
state:state
description:description
favoritingsCount:favoritingsCount
playbackCount:playbackCount
uploadedOn:uploadedOn
isLiked:isLiked
isReposted:isReposted
imageDownloadUrl:imageDownloadUrl
duration:duration
originalContentSize:originalContentSize
completionHandler:^(SWGTrackSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$internalId = "sampleInternalId"; // internal_id
$metaTitle = "sampleMetaTitle"; // meta_title
$metaDescription = "sampleMetaDescription"; // meta_description
$slug = "sampleSlug"; // Slug of track
$title = "sampleTitle"; // Track Title
$artworkUrl = "sampleArtworkUrl"; // artwork_url
$waveformUrl = "sampleWaveformUrl"; // waveform_url
$tagList = "sampleTagList"; // tag_list
$kind = "sampleKind"; // kind
$genre = "sampleGenre"; // genre
$state = "sampleState"; // state
$description = "sampleDescription"; // Track Description
$favoritingsCount = -2147483648; // favoritings_count
$playbackCount = -2147483648; // playback_count
$uploadedOn = "sampleUploadedOn"; // uploaded_on
$isLiked = False; // is_liked
$isReposted = False; // is_reposted
$imageDownloadUrl = "sampleImageDownloadUrl"; // A publicly accessible URL so the file can be downloaded...
$duration = "sampleDuration"; // Number of milliseconds of the track
$originalContentSize = "sampleOriginalContentSize"; // Original Content size
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return TrackSerializer (model)
$response = $web_api->trackUpdateTrack($pk, $internalId, $metaTitle, $metaDescription, $slug, $title, $artworkUrl, $waveformUrl, $tagList, $kind, $genre, $state, $description, $favoritingsCount, $playbackCount, $uploadedOn, $isLiked, $isReposted, $imageDownloadUrl, $duration, $originalContentSize);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return TrackSerializer (model)
response = web_api.track_update_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, image_download_url="sample_image_download_url", duration="sample_duration", original_content_size="sample_original_content_size")
pprint(response)
# asynchronous call
# thread = web_api.track_update_track(pk, internal_id, meta_title="sample_meta_title", meta_description="sample_meta_description", slug="sample_slug", title="sample_title", artwork_url="sample_artwork_url", waveform_url="sample_waveform_url", tag_list="sample_tag_list", kind="sample_kind", genre="sample_genre", state="sample_state", description="sample_description", favoritings_count=-2147483648, playback_count=-2147483648, uploaded_on="sample_uploaded_on", is_liked=False, is_reposted=False, image_download_url="sample_image_download_url", duration="sample_duration", original_content_size="sample_original_content_size", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
internal_id = "sample_internal_id" # internal_id
begin
web_api = DjsApi::WebApi.new
# return TrackSerializer (model)
response = web_api.track_update_track(pk, internal_id, :meta_title => "sample_meta_title", :meta_description => "sample_meta_description", :slug => "sample_slug", :title => "sample_title", :artwork_url => "sample_artwork_url", :waveform_url => "sample_waveform_url", :tag_list => "sample_tag_list", :kind => "sample_kind", :genre => "sample_genre", :state => "sample_state", :description => "sample_description", :favoritings_count => -2147483648, :playback_count => -2147483648, :uploaded_on => "2014-12-31", :is_liked => false, :is_reposted => false, :image_download_url => "sample_image_download_url", :duration => "sample_duration", :original_content_size => "sample_original_content_size")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val internalId = "sampleInternalId" // internal_id
val metaTitle = "sampleMetaTitle" // meta_title
val metaDescription = "sampleMetaDescription" // meta_description
val slug = "sampleSlug" // Slug of track
val title = "sampleTitle" // Track Title
val artworkUrl = "sampleArtworkUrl" // artwork_url
val waveformUrl = "sampleWaveformUrl" // waveform_url
val tagList = "sampleTagList" // tag_list
val kind = "sampleKind" // kind
val genre = "sampleGenre" // genre
val state = "sampleState" // state
val description = "sampleDescription" // Track Description
val favoritingsCount = -2147483648L // favoritings_count
val playbackCount = -2147483648L // playback_count
val uploadedOn = apiClient.parseDate("2014-12-31") // uploaded_on
val isLiked = false // is_liked
val isReposted = false // is_reposted
val imageDownloadUrl = "sampleImageDownloadUrl" // A publicly accessible URL so the file can be downloaded...
val duration = "sampleDuration" // Number of milliseconds of the track
val originalContentSize = "sampleOriginalContentSize" // Original Content size
try {
val webApi = new WebApi
val response = webApi.trackUpdateTrack(pk, internalId, metaTitle, metaDescription, slug, title, artworkUrl, waveformUrl, tagList, kind, genre, state, description, favoritingsCount, playbackCount, uploadedOn, isLiked, isReposted, imageDownloadUrl, duration, originalContentSize)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
venueList
List all Venues
GET http://devcms.djs.com/api/venues/
List all Venues
| Name | Type | Location | Description | |
|---|---|---|---|---|
| page | String | URL query string | Paginate the resultset | |
| only_fields | String | URL query string | Speed up processing time by only selecting the fields you want (Provide a CSV of fieldnames) | |
| per_page | String | URL query string | How many per page you would like (Default is 10) | |
| ordering | String | URL query string | Order the resultset by any field using the field name key of you see in the results | |
| event_ordering | String | URL query string | Order the event resultset with ordering=-popularity. NOTE you must pass with_events in order to sort this resultset | |
| event_per_page | String | URL query string | How many per page you would like (Default is 12 events) | |
| exclusive | Boolean | URL query string | Boolean flag used to show which venues we have full blown pages for ("True" or "False") | |
| location__slug | String | URL query string | Filter by venue location slug | |
| with_events | String | URL query string | Fetch 12 related venue events. Into the a new "events" index. | |
| event_page | String | URL query string | Paginate through more events by increasing by one. Starting at index of 2 because you get your first page on initial "with_events" request |
Request preview:
GET /api/venues/?page=PAGE&only_fields=ONLY_FIELDS&per_page=PER_PAGE&ordering=ORDERING&event_ordering=EVENT_ORDERING&event_per_page=EVENT_PER_PAGE&exclusive=EXCLUSIVE&location__slug=LOCATION__SLUG&with_events=WITH_EVENTS&event_page=EVENT_PAGE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns VenuePaginationSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var page: String = "samplePage"; // Paginate the resultset
var onlyFields: String = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
var perPage: String = "samplePerPage"; // How many per page you would like (Default is 10)
var ordering: String = "sampleOrdering"; // Order the resultset by any field using the field name key...
var eventOrdering: String = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
var eventPerPage: String = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
var exclusive: Boolean = True; // Boolean flag used to show which venues we have full blown...
var locationSlug: String = "sampleLocationSlug"; // Filter by venue location slug
var withEvents: String = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
var eventPage: String = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try
{
var webApi: WebApi = new WebApi();
var response: VenuePaginationSerializer = webApi.venue_list(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
}
catch (e:Error)
{
trace(e)
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
Boolean exclusive = false; // Boolean flag used to show which venues we have full blown...
String locationSlug = "sampleLocationSlug"; // Filter by venue location slug
String withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try {
WebApi webApi = new WebApi();
VenuePaginationSerializer response = webApi.venueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/venues/?page=<page>&only_fields=<only_fields>&per_page=<per_page>&ordering=<ordering>&event_ordering=<event_ordering>&event_per_page=<event_per_page>&exclusive=<exclusive>&location__slug=<location__slug>&with_events=<with_events>&event_page=<event_page>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
bool? exclusive = false; // Boolean flag used to show which venues we have full blown...
String locationSlug = "sampleLocationSlug"; // Filter by venue location slug
String withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
VenuePaginationSerializer response = webApi.VenueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String page = "samplePage"; // Paginate the resultset
String onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
String perPage = "samplePerPage"; // How many per page you would like (Default is 10)
String ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
String eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
Boolean exclusive = false; // Boolean flag used to show which venues we have full blown...
String locationSlug = "sampleLocationSlug"; // Filter by venue location slug
String withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try {
WebApi webApi = new WebApi();
VenuePaginationSerializer response = webApi.venueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['page'] = "samplePage"; // Paginate the resultset
args['only_fields'] = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
args['per_page'] = "samplePerPage"; // How many per page you would like (Default is 10)
args['ordering'] = "sampleOrdering"; // Order the resultset by any field using the field name key...
args['event_ordering'] = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
args['exclusive'] = false; // Boolean flag used to show which venues we have full blown...
args['location__slug'] = "sampleLocationSlug"; // Filter by venue location slug
args['with_events'] = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
swagger.Web.venueList(args, function(response) {
/* success callback */
console.log("Result of Web.venueList");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.venueList:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *page = @"samplePage"; // Paginate the resultset
NSString *onlyFields = @"sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
NSString *perPage = @"samplePerPage"; // How many per page you would like (Default is 10)
NSString *ordering = @"sampleOrdering"; // Order the resultset by any field using the field name key...
NSString *eventOrdering = @"sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
NSNumber *exclusive = @NO; // Boolean flag used to show which venues we have full blown...
NSString *locationSlug = @"sampleLocationSlug"; // Filter by venue location slug
NSString *withEvents = @"sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi venueListWithCompletionBlock:page
onlyFields:onlyFields
perPage:perPage
ordering:ordering
eventOrdering:eventOrdering
eventPerPage:eventPerPage
exclusive:exclusive
locationSlug:locationSlug
withEvents:withEvents
eventPage:eventPage
completionHandler:^(SWGVenuePaginationSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$page = "samplePage"; // Paginate the resultset
$onlyFields = "sampleOnlyFields"; // Speed up processing time by only selecting the fields you...
$perPage = "samplePerPage"; // How many per page you would like (Default is 10)
$ordering = "sampleOrdering"; // Order the resultset by any field using the field name key...
$eventOrdering = "sampleEventOrdering"; // Order the event resultset with ordering=-popularity. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
$exclusive = False; // Boolean flag used to show which venues we have full blown...
$locationSlug = "sampleLocationSlug"; // Filter by venue location slug
$withEvents = "sampleWithEvents"; // Fetch 12 related venue events. Into the a new "events"...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return VenuePaginationSerializer (model)
$response = $web_api->venueList($page, $onlyFields, $perPage, $ordering, $eventOrdering, $eventPerPage, $exclusive, $locationSlug, $withEvents, $eventPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return VenuePaginationSerializer (model)
response = web_api.venue_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", event_ordering="sample_event_ordering", event_per_page="sample_event_per_page", exclusive=False, location__slug="sample_location__slug", with_events="sample_with_events", event_page="sample_event_page")
pprint(response)
# asynchronous call
# thread = web_api.venue_list(page="sample_page", only_fields="sample_only_fields", per_page="sample_per_page", ordering="sample_ordering", event_ordering="sample_event_ordering", event_per_page="sample_event_per_page", exclusive=False, location__slug="sample_location__slug", with_events="sample_with_events", event_page="sample_event_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
begin
web_api = DjsApi::WebApi.new
# return VenuePaginationSerializer (model)
response = web_api.venue_list(:page => "sample_page", :only_fields => "sample_only_fields", :per_page => "sample_per_page", :ordering => "sample_ordering", :event_ordering => "sample_event_ordering", :event_per_page => "sample_event_per_page", :exclusive => false, :location__slug => "sample_location__slug", :with_events => "sample_with_events", :event_page => "sample_event_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val page = "samplePage" // Paginate the resultset
val onlyFields = "sampleOnlyFields" // Speed up processing time by only selecting the fields you...
val perPage = "samplePerPage" // How many per page you would like (Default is 10)
val ordering = "sampleOrdering" // Order the resultset by any field using the field name key...
val eventOrdering = "sampleEventOrdering" // Order the event resultset with ordering=-popularity. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
val exclusive = false // Boolean flag used to show which venues we have full blown...
val locationSlug = "sampleLocationSlug" // Filter by venue location slug
val withEvents = "sampleWithEvents" // Fetch 12 related venue events. Into the a new "events"...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
try {
val webApi = new WebApi
val response = webApi.venueList(page, onlyFields, perPage, ordering, eventOrdering, eventPerPage, exclusive, locationSlug, withEvents, eventPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
venueRetrieve
Fetch a single Venue by Slug or ID
GET http://devcms.djs.com/api/venues/:pk/
Fetch a single Venue by Slug or ID
| Name | Type | Location | Description | |
|---|---|---|---|---|
| pk | String | Part of URL | pk | |
| with_events | String | URL query string | Fetch 20 related Dj events. Into the a new "events" index. | |
| event_ordering | String | URL query string | Order the event resultset by event__popularity with ordering=-event_venues__popularity | |
| event_page | String | URL query string | Paginate through more events by increasing by one. Starting at index of 2 because you get your first page on initial "with_events" request | |
| event_per_page | String | URL query string | How many per page you would like (Default is 12 events) |
Request preview:
GET /api/venues/PK/?with_events=WITH_EVENTS&event_ordering=EVENT_ORDERING&event_page=EVENT_PAGE&event_per_page=EVENT_PER_PAGE HTTP/1.1
Host: devcms.djs.com
Authorization: Token CLIENT_API_KEYThis endpoint returns VenueSerializer (model)
| Error Code | Message |
|---|---|
| 400 | PARSE_ERROR or VALIDATION_ERROR |
| 401 | NOT_AUTHORIZED |
| 403 | PERMISSION_DENIED |
| 500 | UNKNOWN |
| Type | Name | Description | Details |
|---|---|---|---|
| API Key | Default | Default authentication scheme for the API |
Pass As: HTTP Header |
Code Sample
var pk: String = "samplePk"; // pk
var withEvents: String = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
var eventOrdering: String = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
var eventPage: String = "sampleEventPage"; // Paginate through more events by increasing by one. ...
var eventPerPage: String = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try
{
var webApi: WebApi = new WebApi();
var response: VenueSerializer = webApi.venue_retrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
}
catch (e:Error)
{
trace(e)
}
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try {
WebApi webApi = new WebApi();
VenueSerializer response = webApi.venueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "http://devcms.djs.com/api/venues/<pk>/?with_events=<with_events>&event_ordering=<event_ordering>&event_page=<event_page>&event_per_page=<event_per_page>" \
-H "Authorization: Token CLIENT_API_KEY"// authentication setting using api key/token
// in the default (Configuration.Default) or new Configuration()
Configuration configuration = Configuration.Default;
configuration.ApiKeyPrefix["Authorization"] = "Token";
configuration.ApiKey["Authorization"] = "YOUR_API_KEY";
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try
{
// first arguemnt 'basePath' is optional or pass an instance of the Configuration class
// WebApi webApi = new WebApi(new Configuration());
WebApi webApi = new WebApi("http://devcms.djs.com");
VenueSerializer response = webApi.VenueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
Console.WriteLine(response);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
String pk = "samplePk"; // pk
String withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
String eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
String eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
String eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try {
WebApi webApi = new WebApi();
VenueSerializer response = webApi.venueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage);
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
var args = {};
args['pk'] = "samplePk"; // pk
args['with_events'] = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
args['event_ordering'] = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
args['event_page'] = "sampleEventPage"; // Paginate through more events by increasing by one. ...
args['event_per_page'] = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
swagger.Web.venueRetrieve(args, function(response) {
/* success callback */
console.log("Result of Web.venueRetrieve");
var result = response.obj;
// print parsed result
console.log(result);
// print raw response in string
console.log(response.data.toString());
}, function(response) {
/* error callback */
console.log('Error for Web.venueRetrieve:', response.status); // status code
console.log(response.data.toString()); // raw response
//console.log(response.headers); // http headers for JS
//console.log(response.headers.normalized); // http headers for Node.js
});
NSString *pk = @"samplePk"; // pk
NSString *withEvents = @"sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
NSString *eventOrdering = @"sampleEventOrdering"; // Order the event resultset by event__popularity with...
NSString *eventPage = @"sampleEventPage"; // Paginate through more events by increasing by one. ...
NSString *eventPerPage = @"sampleEventPerPage"; // How many per page you would like (Default is 12 events)
@try
{
SWGWebApi *webApi = [[SWGWebApi alloc] init];
// authentiation settings
SWGConfiguration *config = [SWGConfiguration sharedConfig];
// authentication setting using api key/token
[config setApiKeyPrefix:@"Token" forApiKeyPrefixIdentifier:@"Authorization"];
[config setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// calling api method
[webApi venueRetrieveWithCompletionBlock:pk
withEvents:withEvents
eventOrdering:eventOrdering
eventPage:eventPage
eventPerPage:eventPerPage
completionHandler:^(SWGVenueSerializer *output, NSError *error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// initialize the API client with default base URL: http://devcms.djs.com
$api_client = new DjsApi\ApiClient();
// authentication setting using api key/token
DjsApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');
DjsApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$pk = "samplePk"; // pk
$withEvents = "sampleWithEvents"; // Fetch 20 related Dj events. Into the a new "events" index.
$eventOrdering = "sampleEventOrdering"; // Order the event resultset by event__popularity with...
$eventPage = "sampleEventPage"; // Paginate through more events by increasing by one. ...
$eventPerPage = "sampleEventPerPage"; // How many per page you would like (Default is 12 events)
try {
$web_api = new DjsApi\Api\WebAPI($api_client);
// return VenueSerializer (model)
$response = $web_api->venueRetrieve($pk, $withEvents, $eventOrdering, $eventPage, $eventPerPage);
print_r($response);
} catch (DjsApi\ApiException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
echo 'Resepone Header: ', print_r($e->getResponseHeaders(), true), "\n";
echo 'Resepone Body: ', $e->getResponseBody(), "\n";
}
# authentication setting using api key/token
djs_api.configuration.api_key_prefix['Authorization'] = 'Token'
djs_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
pk = "sample_pk" # pk
try:
# (optional) initialize the API client with default base URL: http://petstore.swagger.io/v2
api_client = djs_api.ApiClient()
web_api = djs_api.WebApi(api_client)
# return VenueSerializer (model)
response = web_api.venue_retrieve(pk, with_events="sample_with_events", event_ordering="sample_event_ordering", event_page="sample_event_page", event_per_page="sample_event_per_page")
pprint(response)
# asynchronous call
# thread = web_api.venue_retrieve(pk, with_events="sample_with_events", event_ordering="sample_event_ordering", event_page="sample_event_page", event_per_page="sample_event_per_page", callback=callback_function)
except ApiException as e:
print(e)# authentication settings
DjsApi.configure do |config|
# authentication setting using api key/token
config.api_key_prefix['Authorization'] = 'Token'
config.api_key['Authorization'] = 'YOUR_API_KEY'
end
pk = "sample_pk" # pk
begin
web_api = DjsApi::WebApi.new
# return VenueSerializer (model)
response = web_api.venue_retrieve(pk, :with_events => "sample_with_events", :event_ordering => "sample_event_ordering", :event_page => "sample_event_page", :event_per_page => "sample_event_per_page")
p response
rescue DjsApi::ApiError => e
puts "Failed to call API! Error: #{e}"
puts "Response code: #{e.code}"
puts "Response headers: #{e.response_headers}"
puts "Response body: #{e.response_body}"
end
val pk = "samplePk" // pk
val withEvents = "sampleWithEvents" // Fetch 20 related Dj events. Into the a new "events" index.
val eventOrdering = "sampleEventOrdering" // Order the event resultset by event__popularity with...
val eventPage = "sampleEventPage" // Paginate through more events by increasing by one. ...
val eventPerPage = "sampleEventPerPage" // How many per page you would like (Default is 12 events)
try {
val webApi = new WebApi
val response = webApi.venueRetrieve(pk, withEvents, eventOrdering, eventPage, eventPerPage)
println(response)
} catch {
case e: ApiException => println("ApiException caught: " + e.getMessage())
}
Response Model
Models defined for SDKs (REST API libraries)
ActiveArtistSerializer
Model for ActiveArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist_followers | Array of FollowingArtistSerializer (model) |
Artist followers | |
| artist_followers_count | Integer (signed 64 bits) |
Artist followers count | |
| artist_followers_num_pages | Integer (signed 64 bits) |
Artist followers num pages | |
| birth_day | String |
Birth day | |
| booking_agency | String |
Booking agency | |
| closest_location | String |
Closest location | |
| closest_location_city | String |
Closest location city | |
| contact_email | String |
Contact email | |
| country_code | String |
Country code | |
| country_name | String |
Country name | |
| days_left_on_trial | Integer (signed 64 bits) |
Days left on trial | |
| description | String |
Description | |
| dj_name | String |
Dj name | |
| error | ErrorResponseSerializer (model) |
Error | |
| String |
| ||
| favorite_count | Integer (signed 64 bits) |
Favorite count | |
| favorites | Array of FavoriteTrackSerializer (model) |
Favorites | |
| favorites_count | Integer (signed 64 bits) |
Favorites count | |
| favorites_num_pages | Integer (signed 64 bits) |
Favorites num pages | |
| first_name | String |
First name | |
| followers | Array of FollowerSerializer (model) |
Followers | |
| followers_count | Integer (signed 64 bits) |
Followers count | |
| followers_num_pages | Integer (signed 64 bits) |
Followers num pages | |
| following | Array of FollowingArtistSerializer (model) |
Following | |
| following_count | Integer (signed 64 bits) |
Following count | |
| following_num_pages | Integer (signed 64 bits) |
Following num pages | |
| following_users | Array of FollowingArtistSerializer (model) |
Following users | |
| following_users_count | Integer (signed 64 bits) |
Following users count | |
| following_users_num_pages | Integer (signed 64 bits) |
Following users num pages | |
| headphones | String |
Headphones | |
| id | Integer (signed 64 bits) |
ID | |
| image_url | String |
Image URL | |
| String |
| ||
| is_claimed | Boolean |
Is claimed | |
| is_follower | Boolean |
Is follower | |
| itunes_link | String |
Itunes link | |
| last_name | String |
Last name | |
| login_email | String |
Login email | |
| management_company | String |
Management company | |
| mixer | String |
Mixer | |
| music_player | String |
Music player | |
| origin | String |
Origin | |
| payment_address1 | String |
Payment address1 | |
| payment_address2 | String |
Payment address2 | |
| payment_city | String |
Payment city | |
| payment_ein | String |
Payment ein | |
| payment_state | String |
Payment state | |
| payment_zip | String |
Payment zip | |
| plan | String |
Plan | |
| pr_firm | String |
Pr firm | |
| repost_count | Integer (signed 64 bits) |
Repost count | |
| slug | String |
Slug | |
| software | String |
Software | |
| soundcloud | String |
Soundcloud | |
| soundcloud_id | String |
Soundcloud ID | |
| String |
| ||
| username | String |
Username | |
| user_type | String |
User type | |
| website | String |
Website | |
| youtube | String |
Youtube |
ActiveUserSerializer
Model for ActiveUserSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist_followers | Array of FollowingArtistSerializer (model) |
Artist followers | |
| artist_followers_count | Integer (signed 64 bits) |
Artist followers count | |
| artist_followers_num_pages | Integer (signed 64 bits) |
Artist followers num pages | |
| closest_location | String |
Closest location | |
| closest_location_city | String |
Closest location city | |
| days_left_on_trial | Integer (signed 64 bits) |
Days left on trial | |
| description | String |
Description | |
| String |
| ||
| error | ErrorResponseSerializer (model) |
Error | |
| String |
| ||
| facebook_id | String |
Facebook ID | |
| favorite_count | Integer (signed 64 bits) |
Favorite count | |
| favorites | Array of FavoriteTrackSerializer (model) |
Favorites | |
| favorites_count | Integer (signed 64 bits) |
Favorites count | |
| favorites_num_pages | Integer (signed 64 bits) |
Favorites num pages | |
| first_name | String |
First name | |
| followers | Array of FollowerSerializer (model) |
Followers | |
| followers_count | Integer (signed 64 bits) |
Followers count | |
| followers_num_pages | Integer (signed 64 bits) |
Followers num pages | |
| following | Array of FollowingArtistSerializer (model) |
Following | |
| following_count | Integer (signed 64 bits) |
Following count | |
| following_num_pages | Integer (signed 64 bits) |
Following num pages | |
| following_users | Array of FollowingArtistSerializer (model) |
Following users | |
| following_users_count | Integer (signed 64 bits) |
Following users count | |
| following_users_num_pages | Integer (signed 64 bits) |
Following users num pages | |
| id | Integer (signed 64 bits) |
ID | |
| image_url | String |
Image URL | |
| String |
| ||
| is_facebook | Boolean |
Is facebook | |
| is_follower | Boolean |
Is follower | |
| last_name | String |
Last name | |
| name | String |
Name | |
| plan | String |
Plan | |
| repost_count | Integer (signed 64 bits) |
Repost count | |
| slug | String |
Slug | |
| String |
| ||
| username | String |
Username | |
| user_type | String |
User type | |
| website | String |
Website |
ArtistChangeRecordSerializer
Model for ArtistChangeRecordSerializer
| Name | Type | Description | |
|---|---|---|---|
| messages | MessageSerializer (model) |
Messages | |
| results | ArtistSerializer (model) |
Results |
ArtistPaginationSerializer
Model for ArtistPaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of ArtistSerializer (model) |
Results |
ArtistSerializer
Model for ArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| aliases | Array of String |
Aliases | |
| artist_followers | Array of FollowerSerializer (model) |
Artist followers | |
| artist_followers_count | Integer (signed 64 bits) |
Artist followers count | |
| artist_followers_num_pages | Integer (signed 64 bits) |
Artist followers num pages | |
| birthday | String |
Birthday | |
| country_code | String |
Country code | |
| country_name | String |
Country name | |
| created | String (date & time) |
Created | |
| description | String |
Description | |
| events | Array of EventSerializer (model) |
Events | |
| events_count | Integer (signed 64 bits) |
Events count | |
| events_num_pages | Integer (signed 64 bits) |
Events num pages | |
| String |
| ||
| featured_tracks | Array of TrackSerializer (model) |
Featured tracks | |
| featured_tracks_count | Integer (signed 64 bits) |
Featured tracks count | |
| featured_tracks_num_pages | Integer (signed 64 bits) |
Featured tracks num pages | |
| first_name | String |
First name | |
| followers | Array of FollowerSerializer (model) |
Followers | |
| followers_count | Integer (signed 64 bits) |
Followers count | |
| followers_num_pages | Integer (signed 64 bits) |
Followers num pages | |
| following | Array of FollowerSerializer (model) |
Following | |
| following_count | Integer (signed 64 bits) |
Following count | |
| following_num_pages | Integer (signed 64 bits) |
Following num pages | |
| following_users | Array of FollowerSerializer (model) |
Following users | |
| following_users_count | Integer (signed 64 bits) |
Following users count | |
| following_users_num_pages | Integer (signed 64 bits) |
Following users num pages | |
| genres | Array of GenreArtistSerializer (model) |
Genres | |
| has_mixbank | Boolean |
Has mixbank | |
| headphones | String |
Headphones | |
| image_url | String |
Image URL | |
| String |
| ||
| is_claimed | Boolean |
Is claimed | |
| is_following | Boolean |
Is following | |
| itunes_link | String |
Itunes link | |
| labels | Array of String |
Labels | |
| last_name | String |
Last name | |
| management_contacts | Array of String |
Management contacts | |
| meta_description | String |
Meta description | |
| meta_title | String |
Meta title | |
| middle_name | String |
Middle name | |
| modified | String (date & time) |
Modified | |
| music_player | String |
Music player | |
| name | String |
Name | |
| origin | String |
Origin | |
| pk | Integer (signed 64 bits) |
Pk | |
| pr_contacts | Array of String |
Pr contacts | |
| sk_id | String |
Sk ID | |
| sk_on_tour_until | String |
Sk on tour until | |
| sk_uri | String |
Sk uri | |
| slug | String |
Slug | |
| software | String |
Software | |
| soundcloud_followers_count | Integer (signed 64 bits) |
Soundcloud followers count | |
| soundclouds | Array of SoundCloudSerializer (model) |
Soundclouds | |
| tier | Integer (signed 64 bits) |
Tier Minimum: -2147483648 Maximum: 2147483647 | |
| total_mp3s_uploaded | Integer (signed 64 bits) |
Total mp3s uploaded | |
| tracks | Array of TrackSerializer (model) |
Tracks | |
| tracks_count | Integer (signed 64 bits) |
Tracks count | |
| tracks_num_pages | Integer (signed 64 bits) |
Tracks num pages | |
| triangulation_url | String |
Triangulation URL | |
| String |
| ||
| website | String |
Website | |
| years_active | String |
Years active | |
| youtube | String |
Youtube |
AuthIndexResponseSerializer
Model for AuthIndexResponseSerializer
| Name | Type | Description | |
|---|---|---|---|
| access_token | String |
Access token | |
| create_user | String |
Create user | |
| follow_user | String |
Follow user | |
| status | String |
Status | |
| unfollow_user | String |
Unfollow user | |
| update_artist_user | String |
Update artist user | |
| update_user | String |
Update user | |
| view_artist_user | String |
View artist user | |
| view_user | String |
View user |
AuthResponseSerializer
Model for AuthResponseSerializer
| Name | Type | Description | |
|---|---|---|---|
| active_artist | ActiveArtistSerializer (model) |
Active artist | |
| active_user | ActiveUserSerializer (model) |
Active user | |
| auth_type | String |
Auth type | |
| token | String |
Token |
AuthStatusResponseSerializer
Model for AuthStatusResponseSerializer
| Name | Type | Description | |
|---|---|---|---|
| active_artist | ActiveArtistSerializer (model) |
Active artist | |
| active_user | ActiveUserSerializer (model) |
Active user | |
| auth_type | String |
Auth type |
ClaimSerializer
Model for ClaimSerializer
| Name | Type | Description | |
|---|---|---|---|
| access_token | String |
Access token | |
| error_code | String |
Error code | |
| fields | Array of String |
Fields | |
| message | String |
Message | |
| success | Boolean |
Success |
ContactEntryChangeRecordSerializer
Model for ContactEntryChangeRecordSerializer
| Name | Type | Description | |
|---|---|---|---|
| messages | MessageSerializer (model) |
Messages | |
| results | ContactEntrySerializer (model) |
Results |
ContactEntrySerializer
Model for ContactEntrySerializer
| Name | Type | Description | |
|---|---|---|---|
| comments | String |
Comments | |
| created | String (date & time) |
Created | |
| String |
| ||
| modified | String (date & time) |
Modified | |
| name | String |
Name | |
| phone | String |
Phone | |
| pk | Integer (signed 64 bits) |
Pk |
CountryPaginationSerializer
Model for CountryPaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of CountrySerializer (model) |
Results |
CountrySerializer
Model for CountrySerializer
| Name | Type | Description | |
|---|---|---|---|
| country | String |
Country | |
| key | String |
Key | |
| pk | Integer (signed 64 bits) |
Pk |
DjTierSerializer
Model for DjTierSerializer
| Name | Type | Description | |
|---|---|---|---|
| featured | Array of FeaturedArtistSerializer (model) |
Featured | |
| genres | Array of GenreSerializer (model) |
Genres | |
| newest | Array of ArtistSerializer (model) |
Newest | |
| top_djs | Array of ArtistSerializer (model) |
Top djs | |
| up_and_coming | Array of ArtistSerializer (model) |
Up and coming |
ErrorResponseSerializer
Model for ErrorResponseSerializer
| Name | Type | Description | |
|---|---|---|---|
| error_code | String |
Error code | |
| fields | Array of String |
Fields | |
| message | String |
Message |
EventArtistSerializer
Model for EventArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist_image_url | String |
Artist image URL | |
| artist_slug | String |
Artist slug | |
| display_name | String |
Display name | |
| songkick_uri | String |
Songkick uri |
EventPaginationSerializer
Model for EventPaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of EventSerializer (model) |
Results |
EventSerializer
Model for EventSerializer
| Name | Type | Description | |
|---|---|---|---|
| age_restriction | String |
Age restriction | |
| artists | Array of EventArtistSerializer (model) |
Artists | |
| created | String (date & time) |
Created | |
| disabled | Boolean |
Disabled | |
| display_name | String |
Display name | |
| event_date_end | String (date) |
Event date end | |
| event_date_start | String (date) |
Event date start | |
| event_end_time | String |
Event end time | |
| event_start_time | String |
Event start time | |
| event_type | String |
Event type | |
| image_url | String |
Image URL | |
| jumbotron_image_url | String |
Jumbotron image URL | |
| meta_description | String |
Meta description | |
| meta_title | String |
Meta title | |
| modified | String (date & time) |
Modified | |
| pk | Integer (signed 64 bits) |
Pk | |
| popularity | String |
Popularity | |
| series_name | String |
Series name | |
| sk_id | String |
Sk ID | |
| slug | String |
Slug | |
| uri | String |
Uri | |
| venue | VenueSerializer (model) |
Venue |
FavoriteTrackSerializer
Model for FavoriteTrackSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist_name | String |
Artist name | |
| artist_sk_id | String |
Artist sk ID | |
| artist_slug | String |
Artist slug | |
| artwork_url | String |
Artwork URL | |
| internal_id | String |
Internal ID | |
| slug | String |
Slug | |
| small_artwork_url | String |
Small artwork URL | |
| title | String |
Title |
FeaturedArtistSerializer
Model for FeaturedArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist | ArtistSerializer (model) |
Artist | |
| jumbotron_image_url | String |
Jumbotron image URL | |
| jumbotron_mobile_image_url | String |
Jumbotron mobile image URL | |
| pk | Integer (signed 64 bits) |
Pk | |
| priority | Integer (signed 64 bits) |
Priority Minimum: -2147483648 Maximum: 2147483647 |
FeaturedEventSerializer
Model for FeaturedEventSerializer
| Name | Type | Description | |
|---|---|---|---|
| display_name | String |
Display name | |
| event_date_end | String (date) |
Event date end | |
| event_date_start | String (date) |
Event date start | |
| event_end | String (date & time) |
Event end | |
| event_start | String (date & time) |
Event start | |
| jumbotron_image_url | String |
Jumbotron image URL | |
| jumbotron_mobile_image_url | String |
Jumbotron mobile image URL | |
| pk | Integer (signed 64 bits) |
Pk | |
| priority | Integer (signed 64 bits) |
Priority | |
| sk_uri | String |
Sk uri | |
| slug | String |
Slug | |
| venue_name | String |
Venue name |
FeaturedTrackSerializer
Model for FeaturedTrackSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist_name | String |
Artist name | |
| artist_sk_id | String |
Artist sk ID | |
| internal_id | String |
Internal ID | |
| jumbotron_image_url | String |
Jumbotron image URL | |
| jumbotron_mobile_image_url | String |
Jumbotron mobile image URL | |
| priority | Integer (signed 64 bits) |
Priority | |
| slug | String |
Slug | |
| title | String |
Title | |
| track_id | Integer (signed 64 bits) |
Track ID |
FeaturedVenueSerializer
Model for FeaturedVenueSerializer
| Name | Type | Description | |
|---|---|---|---|
| display_name | String |
Display name | |
| jumbotron_image_url | String |
Jumbotron image URL | |
| jumbotron_mobile_image_url | String |
Jumbotron mobile image URL | |
| latitude | Number (float) |
Latitude | |
| longitude | Number (float) |
Longitude | |
| pk | Integer (signed 64 bits) |
Pk | |
| priority | Integer (signed 64 bits) |
Priority | |
| slug | String |
Slug |
FollowerSerializer
Model for FollowerSerializer
| Name | Type | Description | |
|---|---|---|---|
| favorite_count | Integer (signed 64 bits) |
Favorite count | |
| first_name | String |
First name | |
| followers_count | Integer (signed 64 bits) |
Followers count | |
| following_count | Integer (signed 64 bits) |
Following count | |
| image_url | String |
Image URL | |
| is_following | Boolean |
Is following | |
| last_name | String |
Last name | |
| repost_count | Integer (signed 64 bits) |
Repost count | |
| slug | String |
Slug |
FollowingArtistSerializer
Model for FollowingArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| followers_count | String |
Followers count | |
| image_url | String |
Image URL | |
| is_following | Boolean |
Is following | |
| name | String |
Name | |
| slug | String |
Slug | |
| total_mp3s_uploaded | String |
Total mp3s uploaded |
GenreArtistSerializer
Model for GenreArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| key | String |
Key | |
| label | String |
Label |
GenrePaginationSerializer
Model for GenrePaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of GenreSerializer (model) |
Results |
GenreSerializer
Model for GenreSerializer
| Name | Type | Description | |
|---|---|---|---|
| jumbotron_image_url | String |
Jumbotron image URL | |
| key | String |
Key | |
| label | String |
Label | |
| pk | Integer (signed 64 bits) |
Pk |
LocationPaginationSerializer
Model for LocationPaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of LocationSerializer (model) |
Results |
LocationSerializer
Model for LocationSerializer
| Name | Type | Description | |
|---|---|---|---|
| city | String |
City | |
| events | Array of VenueEventSerializer (model) |
Events | |
| events_count | Integer (signed 64 bits) |
Events count | |
| events_num_pages | Integer (signed 64 bits) |
Events num pages | |
| featured_events | Array of FeaturedEventSerializer (model) |
Featured events | |
| featured_venues | Array of FeaturedVenueSerializer (model) |
Featured venues | |
| latitude | String |
Latitude | |
| longitude | String |
Longitude | |
| meta_description | String |
Meta description | |
| meta_title | String |
Meta title | |
| selectable | Boolean |
Selectable | |
| slug | String |
Slug | |
| venues | Array of VenueLocationSerializer (model) |
Venues | |
| venues_count | Integer (signed 64 bits) |
Venues count | |
| venues_num_pages | Integer (signed 64 bits) |
Venues num pages |
MessageSerializer
Model for MessageSerializer
| Name | Type | Description | |
|---|---|---|---|
| detail | String |
Detail | |
| errors | Boolean |
Errors |
MusicSerializer
Model for MusicSerializer
| Name | Type | Description | |
|---|---|---|---|
| featured | Array of FeaturedTrackSerializer (model) |
Featured | |
| most_recent | Array of TrackSerializer (model) |
Most recent | |
| top_djs | Array of ArtistSerializer (model) |
Top djs | |
| trending | Array of TrackSerializer (model) |
Trending |
NewsletterSignupChangeRecordSerializer
Model for NewsletterSignupChangeRecordSerializer
| Name | Type | Description | |
|---|---|---|---|
| messages | MessageSerializer (model) |
Messages | |
| results | NewsletterSignupSerializer (model) |
Results |
NewsletterSignupSerializer
Model for NewsletterSignupSerializer
| Name | Type | Description | |
|---|---|---|---|
| created | String (date & time) |
Created | |
| String |
| ||
| modified | String (date & time) |
Modified | |
| name | String |
Name | |
| pk | Integer (signed 64 bits) |
Pk |
PostPaginationSerializer
Model for PostPaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of PostSerializer (model) |
Results |
PostSerializer
Model for PostSerializer
| Name | Type | Description | |
|---|---|---|---|
| author_first_name | String |
Author first name | |
| author_id | String |
Author ID | |
| author_last_name | String |
Author last name | |
| category_name | String |
Category name | |
| content_html | String |
Content html | |
| created | String (date & time) |
Created | |
| id | Integer (signed 64 bits) |
ID | |
| image_url | String |
Image URL | |
| is_featured | String |
Is featured | |
| jumbotron_image_url | String |
Jumbotron image URL | |
| jumbotron_mobile_image_url | String |
Jumbotron mobile image URL | |
| meta_description | String |
Meta description | |
| meta_title | String |
Meta title | |
| modified | String (date & time) |
Modified | |
| slug | String |
Slug | |
| tag_line | String |
Tag line | |
| title | String |
Title |
SearchSerializer
Model for SearchSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist | Array of ArtistSerializer (model) |
Artist | |
| event | Array of EventSerializer (model) |
Event | |
| streamuser | Array of FollowerSerializer (model) |
Streamuser | |
| track | Array of TrackSerializer (model) |
Track | |
| venue | Array of VenueSerializer (model) |
Venue |
SoundCloudSerializer
Model for SoundCloudSerializer
| Name | Type | Description | |
|---|---|---|---|
| soundcloud_user_id | String |
Soundcloud user ID | |
| value | String |
Value |
SuccessAndErrorSerializer
Model for SuccessAndErrorSerializer
| Name | Type | Description | |
|---|---|---|---|
| error_code | String |
Error code | |
| fields | Array of String |
Fields | |
| message | String |
Message | |
| success | Boolean |
Success |
SuccessSerializer
Model for SuccessSerializer
| Name | Type | Description | |
|---|---|---|---|
| success | Boolean |
Success |
TrackArtistSerializer
Model for TrackArtistSerializer
| Name | Type | Description | |
|---|---|---|---|
| image_url | String |
Image URL | |
| name | String |
Name | |
| pk | Integer (signed 64 bits) |
Pk | |
| sk_id | String |
Sk ID | |
| slug | String |
Slug | |
| user_pk | Integer (signed 64 bits) |
User pk |
TrackPaginationSerializer
Model for TrackPaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of TrackSerializer (model) |
Results |
TrackPlayResponseSerializer
Model for TrackPlayResponseSerializer
| Name | Type | Description | |
|---|---|---|---|
| all_hash_tags | String |
All hash tags | |
| analytics_key | String |
Analytics key | |
| artist | String |
Artist | |
| artist_sk_id | String |
Artist sk ID | |
| artist_slug | String |
Artist slug | |
| artwork_url | String |
Artwork URL | |
| description | String |
Description | |
| duration | Integer (signed 64 bits) |
Duration | |
| favoritings_count | Integer (signed 64 bits) |
Favoritings count | |
| human_time | String |
Human time | |
| internal_id | String |
Internal ID | |
| is_liked | Boolean |
Is liked | |
| is_reposted | Boolean |
Is reposted | |
| mp3 | String |
Mp3 | |
| playback_count | Integer (signed 64 bits) |
Playback count | |
| random_hash_tag | String |
Random hash tag | |
| reposted_count | Integer (signed 64 bits) |
Reposted count | |
| small_artwork_url | String |
Small artwork URL | |
| title | String |
Title | |
| track | TrackSerializer (model) |
Track | |
| track_slug | String |
Track slug | |
| uploaded_on | String (date) |
Uploaded on | |
| waveform | String |
Waveform |
TrackPlayUpdateResponseSerializer
Model for TrackPlayUpdateResponseSerializer
| Name | Type | Description | |
|---|---|---|---|
| analytics_key | String |
Analytics key | |
| success | Boolean |
Success |
TrackSerializer
Model for TrackSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist | TrackArtistSerializer (model) |
Artist | |
| artwork_url | String |
Artwork URL | |
| description | String |
Description | |
| favoritings_count | Integer (signed 64 bits) |
Favoritings count Minimum: -2147483648 Maximum: 2147483647 | |
| genre | String |
Genre | |
| human_time | String |
Human time | |
| internal_id | String |
Internal ID | |
| is_liked | Boolean |
Is liked | |
| is_reposted | Boolean |
Is reposted | |
| kind | String |
Kind | |
| meta_description | String |
Meta description | |
| meta_title | String |
Meta title | |
| pk | Integer (signed 64 bits) |
Pk | |
| playback_count | Integer (signed 64 bits) |
Playback count Minimum: -2147483648 Maximum: 2147483647 | |
| reposted_count | String |
Reposted count | |
| slug | String |
Slug | |
| small_artwork_url | String |
Small artwork URL | |
| state | String |
State | |
| tag_list | String |
Tag list | |
| title | String |
Title | |
| triangulation_url | String |
Triangulation URL | |
| uploaded_on | String (date) |
Uploaded on | |
| waveform_url | String |
Waveform URL |
VenueEventSerializer
Model for VenueEventSerializer
| Name | Type | Description | |
|---|---|---|---|
| artist_image_url | String |
Artist image URL | |
| display_name | String |
Display name | |
| event_date_end | String (date) |
Event date end | |
| event_date_start | String (date) |
Event date start | |
| event_end | String (date & time) |
Event end | |
| event_end_time | String |
Event end time | |
| event_start | String (date & time) |
Event start | |
| event_start_time | String |
Event start time | |
| image_url | String |
Image URL | |
| location_city | String |
Location city | |
| pk | Integer (signed 64 bits) |
Pk | |
| sk_uri | String |
Sk uri | |
| slug | String |
Slug | |
| venue_is_exclusive | Boolean |
Venue is exclusive | |
| venue_name | String |
Venue name | |
| venue_sk_url | String |
Venue sk URL | |
| venue_slug | String |
Venue slug |
VenueLocationSerializer
Model for VenueLocationSerializer
| Name | Type | Description | |
|---|---|---|---|
| display_name | String |
Display name | |
| exclusive | Boolean |
Exclusive | |
| image_url | String |
Image URL | |
| latitude | Number (float) |
Latitude | |
| longitude | Number (float) |
Longitude | |
| pk | Integer (signed 64 bits) |
Pk | |
| slug | String |
Slug | |
| street | String |
Street |
VenuePaginationSerializer
Model for VenuePaginationSerializer
| Name | Type | Description | |
|---|---|---|---|
| count | Integer (signed 64 bits) |
Count | |
| next | String |
Next | |
| previous | String |
Previous | |
| results | Array of VenueSerializer (model) |
Results |
VenueSerializer
Model for VenueSerializer
| Name | Type | Description | |
|---|---|---|---|
| ages | String |
Ages | |
| alcohol | String |
Alcohol | |
| ambiance | String |
Ambiance | |
| capacity | String |
Capacity | |
| coat_check | Boolean |
Coat check | |
| created | String (date & time) |
Created | |
| description | String |
Description | |
| display_name | String |
Display name | |
| dress_code | String |
Dress code | |
| String |
| ||
| events | Array of VenueEventSerializer (model) |
Events | |
| events_count | Integer (signed 64 bits) |
Events count | |
| events_num_pages | Integer (signed 64 bits) |
Events num pages | |
| exclusive | Boolean |
Exclusive | |
| String |
| ||
| friday_hours | String |
Friday hours | |
| image_url | String |
Image URL | |
| String |
| ||
| latitude | String |
Latitude | |
| location | LocationSerializer (model) |
Location | |
| longitude | String |
Longitude | |
| meta_description | String |
Meta description | |
| meta_title | String |
Meta title | |
| modified | String (date & time) |
Modified | |
| monday_hours | String |
Monday hours | |
| music_type | String |
Music type | |
| parking | String |
Parking | |
| phone | String |
Phone | |
| saturday_hours | String |
Saturday hours | |
| sk_id | String |
Sk ID | |
| sk_uri | String |
Sk uri | |
| slug | String |
Slug | |
| smoking | String |
Smoking Enumerated Values: Yes, No, Outdoor, | |
| street | String |
Street | |
| sunday_hours | String |
Sunday hours | |
| thursday_hours | String |
Thursday hours | |
| tuesday_hours | String |
Tuesday hours | |
| String |
| ||
| website | String |
Website | |
| wednesday_hours | String |
Wednesday hours | |
| youtube | String |
Youtube | |
| zip | String |
Zip |
Empty
This indicates the endpoint does not return any data in the HTTP Response body. It simply relies on HTTP status code (e.g. 200) to indicate if the request is successful.
Welcome to the Djs.com REST API!
View our SDK(Built with Restunited.com)
[Production] version 2.0.0 (released on 2016-04-26 14:33:55 UTC)
Release note: Final Build